DataSource.NET  7.1.27.94946-7eb8eb54
Caplin.DataSource.Publisher.ICachingDataProvider Interface Reference

Inherited by Caplin.DataSource.Channel.JsonChannelProvider.

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(Message) to publish the current image of the data.
    Parameters
    subjectThe subject for this request.

Generated on Wed Jan 4 2023 17:00:07 for DataSource.NET