DataSource.NET  7.1.13.29686-d434448
Caplin.DataSource.Publisher.ICachingDataProvider Interface Reference

Public Member Functions

void onDiscard (String subject)
 
void onRequest (String subject)
 

Detailed Description

Interface that must be implemented in order to provide data updates to DataSource peers for cached objects. It contains callbacks that handle subscription and discard requests.

Note: the CachingDataProvider methods are not called on a dedicated worker thread. Therefore, if any of these methods are likely take a relatively long time to execute, they should be coded to run in a separate thread.

Member Function Documentation

void Caplin.DataSource.Publisher.ICachingDataProvider.onDiscard ( String  subject)

Callback that informs the DataProvider that an earlier requested subject has now been discarded.

Parameters
subjectThe subject that has been discarded.
void Caplin.DataSource.Publisher.ICachingDataProvider.onRequest ( String  subject)

Callback that informs the CachingDataProvider that a new request has been received and it should start sending data.

The CachingDataProvider should perform the following tasks when this method is called:

  1. If that DataSource is not already subscribed to the back end system that supplies the data for this subject, the DataSource should make a subscription for the subject.
  2. When data is received from the back end system for the subject, the CachingDataProvider should call CachingPublisher#publish(com.caplin.datasource.messaging.Message) to publish the current image of the data.
    Parameters
    subjectThe subject for this request.

Generated on Fri Apr 24 2020 16:29:45 for DataSource.NET