public static interface HollowConsumer.AnnouncementWatcher
1) Tracking the latest announced data state version. 2) Keeping the client up to date by calling triggerAsyncRefresh() on self when the latest version changes.
If an AnnouncementWatcher is provided to a HollowConsumer, then calling HollowConsumer#triggerRefreshTo() is unsupported.
Modifier and Type | Field and Description |
---|---|
static long |
NO_ANNOUNCEMENT_AVAILABLE |
Modifier and Type | Method and Description |
---|---|
long |
getLatestVersion()
Return the latest announced version.
|
void |
subscribeToUpdates(HollowConsumer consumer)
Implementations of this method should subscribe a HollowConsumer to updates to announced versions.
|
static final long NO_ANNOUNCEMENT_AVAILABLE
long getLatestVersion()
void subscribeToUpdates(HollowConsumer consumer)
When announcements are received via a push mechanism, or polling reveals a new version, a call should be placed to one
of the flavors of HollowConsumer.triggerRefresh()
on the provided HollowConsumer.