public class WheelTimerServiceSupplier extends Object implements TimerServiceSupplier
WheelTimerService based on the configuration given to the constructor| Constructor and Description |
|---|
WheelTimerServiceSupplier(TimeUnit timeUnit,
long startTime,
long tickResolution,
int ticksPerWheel)
Construct the supplier with the necessary parameters to configure the timer wheel.
|
| Modifier and Type | Method and Description |
|---|---|
TimerService |
newInstance(TimeUnit clusterTimeUnit,
TimerService.TimerHandler timerHandler)
New instance of the
TimerService. |
public WheelTimerServiceSupplier(TimeUnit timeUnit, long startTime, long tickResolution, int ticksPerWheel)
timeUnit - for the values used to express the time. This time unit is used to denote the supplied
time values. When the instance is constructed it will use this to convert the supplied
startTime and tickResolution into the time unit that is being
used by the cluster clock.startTime - for the wheel (in given TimeUnit).tickResolution - for the wheel, i.e. how many TimeUnits per tick.ticksPerWheel - or spokes, for the wheel (must be power of 2).public TimerService newInstance(TimeUnit clusterTimeUnit, TimerService.TimerHandler timerHandler)
TimerService.newInstance in interface TimerServiceSupplierclusterTimeUnit - units to be used by the underlying timer service.timerHandler - that must be invoked for each expired timer.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.