HollowConsumer.AnnouncementWatcher
for use with the HollowConsumer
instead.@Deprecated
public abstract class HollowAnnouncementWatcher
extends java.lang.Object
HollowAnnouncementWatcher.DefaultWatcher
is available. If this implementation
is used, calling HollowClient.triggerRefresh()
will always attempt to get to the latest state, unless an
explicit state was specified via HollowClient.triggerRefreshTo(long)
.Modifier and Type | Class and Description |
---|---|
static class |
HollowAnnouncementWatcher.DefaultWatcher
Deprecated.
|
Constructor and Description |
---|
HollowAnnouncementWatcher()
Deprecated.
Construct a HollowAnnouncementWatcher with a default ExecutorService.
|
HollowAnnouncementWatcher(java.util.concurrent.ExecutorService refreshExecutor)
Deprecated.
Construct a HollowAnnouncementWatcher with the specified ExecutorService.
|
Modifier and Type | Method and Description |
---|---|
protected void |
forceDoubleSnapshotNextUpdate()
Deprecated.
Will force a double snapshot refresh on the next update.
|
protected HollowClient |
getClientToNotify()
Deprecated.
|
abstract long |
getLatestVersion()
Deprecated.
|
void |
setLatestVersion(long latestVersion)
Deprecated.
Override this method ONLY if it is legal to explicitly update to a specific version.
|
abstract void |
subscribeToEvents()
Deprecated.
If some push announcement mechanism is to be provided by this HollowAnnouncementWatcher, subscribe here.
|
void |
triggerAsyncRefresh()
Deprecated.
Triggers a refresh in a new thread immediately.
|
void |
triggerAsyncRefreshWithDelay(int delayMillis)
Deprecated.
Triggers async refresh after the specified number of milliseconds has passed.
|
void |
triggerAsyncRefreshWithRandomDelay(int maxDelayMillis)
Deprecated.
Triggers async refresh after some random number of milliseconds have passed,
between now and the specified maximum number of milliseconds.
|
public HollowAnnouncementWatcher()
public HollowAnnouncementWatcher(java.util.concurrent.ExecutorService refreshExecutor)
refreshExecutor
- the ExecutorService to use for asynchronous state refresh.public abstract long getLatestVersion()
public abstract void subscribeToEvents()
public void setLatestVersion(long latestVersion)
latestVersion
- the latest versionprotected void forceDoubleSnapshotNextUpdate()
public void triggerAsyncRefresh()
public void triggerAsyncRefreshWithRandomDelay(int maxDelayMillis)
maxDelayMillis
- the maximum delay in millisecondspublic void triggerAsyncRefreshWithDelay(int delayMillis)
delayMillis
- the delay in millisecondsprotected HollowClient getClientToNotify()