Package io.higson.runtime.sync
Class DomainWatcherConfig
java.lang.Object
io.higson.runtime.sync.WatcherConfig
io.higson.runtime.sync.DomainWatcherConfig
This class supports extra configuration for
DomainRuntimeWatcher.
Here lifespan of domain trees within cache can be defined. If not used, by default 24 hours lifespan will be used.-
Field Summary
FieldsFields inherited from class io.higson.runtime.sync.WatcherConfig
DEFAULT_ERROR_RECOVERY_SECONDS, DEFAULT_FORCE_SYNC_SECONDS, DEFAULT_START_DELAY_SECONDS, DEFAULT_WATCHER_PAUSE_SECONDS -
Constructor Summary
ConstructorsConstructorDescriptionDomainWatcherConfig(int watcherStartDelaySeconds, int watcherPauseSeconds, int watcherErrorPauseSeconds) -
Method Summary
Modifier and TypeMethodDescriptiondelay(int startDelaySeconds) error(int errorSeconds) invalidate(int invalidate, TemporalUnit timeUnit) Setup lifespan of domain tree within cache.pause(int pauseSeconds) toString()Methods inherited from class io.higson.runtime.sync.WatcherConfig
force, getErrorPauseSeconds, getForcePauseMillis, getForcePauseSeconds, getStartDelaySeconds, getWatcherPauseSeconds
-
Field Details
-
DEFAULT_LIFESPAN_IN_CACHE_VALUE
public static final int DEFAULT_LIFESPAN_IN_CACHE_VALUE- See Also:
-
DEFAULT_LIFESPAN_IN_CACHE_UNIT
-
-
Constructor Details
-
DomainWatcherConfig
public DomainWatcherConfig() -
DomainWatcherConfig
public DomainWatcherConfig(int watcherStartDelaySeconds, int watcherPauseSeconds, int watcherErrorPauseSeconds)
-
-
Method Details
-
invalidate
Setup lifespan of domain tree within cache.- Parameters:
invalidate- value of timetimeUnit- defined time unit- Returns:
- same instance of config
-
delay
- Overrides:
delayin classWatcherConfig
-
pause
- Overrides:
pausein classWatcherConfig
-
error
- Overrides:
errorin classWatcherConfig
-
toString
- Overrides:
toStringin classWatcherConfig
-