T- The type of subject info that will be provided with requests and discards.
public interface CachedDataProvider<T extends SubjectInfo>
A DataProvider which receives a single
and a single
onDiscard(SubjectInfo), even if requests are made from
multiple peers. A cache is kept for subscriptions and also records so that any
subsequent peer request after an initial request will receive the current state
of the message before another update is sent.
In conjunction with a
SubjectParser, each request and discard will be
provided a parsed object that represents the subject.
void onRequest(T subject)
subject- The subject that was requested.
void onDiscard(T subject)
subject- The subject that was discarded.
Copyright © 2020 Caplin Systems.