public interface RenewableTimeoutService
RenewableTimeoutService.RenewableTimeout instances. Implementations of this interface are expected
but not required to also act as lifecycle managers for the timeouts they return.| Modifier and Type | Interface and Description |
|---|---|
static interface |
RenewableTimeoutService.RenewableTimeout
The handle for a timeout.
|
static interface |
RenewableTimeoutService.TimeoutHandler
Represents the action to take upon expiry of a timeout.
|
static interface |
RenewableTimeoutService.TimeoutName |
| Modifier and Type | Method and Description |
|---|---|
RenewableTimeoutService.RenewableTimeout |
create(RenewableTimeoutService.TimeoutName timeoutName,
long delayInMillis,
long randomRangeInMillis,
RenewableTimeoutService.TimeoutHandler handler)
The main factory method.
|
RenewableTimeoutService.RenewableTimeout create(RenewableTimeoutService.TimeoutName timeoutName, long delayInMillis, long randomRangeInMillis, RenewableTimeoutService.TimeoutHandler handler)
RenewableTimeoutService.RenewableTimeout handle for a RenewableTimeoutService.TimeoutHandler that will trigger once,
after plus or minus a random interval, unless renewed. Upon triggering, the supplied
will be called.
timeoutName - The timeout name, for lookup purposesdelayInMillis - The amount of time after this timeout will be triggeredrandomRangeInMillis - The upper limit of a range of longs (0 is the lower limit) from which a random value will be
selected with uniform probability, and added to the delay. Setting this value to 0 means
no randomness.handler - The RenewableTimeoutService.TimeoutHandler to call when this timeout triggersCopyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.