K
- Type of the keypublic interface TimerService<K>
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(K key,
UUID ticket)
Check whether the timeout for the given key and ticket is still valid (not yet unregistered
and not yet overwritten).
|
void |
registerTimeout(K key,
long delay,
TimeUnit unit)
Register a timeout for the given key which shall occur in the given delay.
|
void |
start(TimeoutListener<K> timeoutListener)
Starts this timer service.
|
void |
stop()
Stops this timer service.
|
void |
unregisterTimeout(K key)
Unregister the timeout for the given key.
|
void start(TimeoutListener<K> timeoutListener)
timeoutListener
- listener for timeouts that have firedvoid stop()
void registerTimeout(K key, long delay, TimeUnit unit)
key
- for which to register the timeoutdelay
- until the timeoutunit
- of the timeout delayvoid unregisterTimeout(K key)
key
- for which to unregister the timeoutboolean isValid(K key, UUID ticket)
key
- for which to check the timeoutticket
- of the timeoutCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.