Package kilim.timerservice
Class TimerService
- java.lang.Object
-
- kilim.timerservice.TimerService
-
public class TimerService extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classTimerService.DaemonFactoryprivate classTimerService.Emptystatic interfaceTimerService.WatchdogContextstatic classTimerService.WatchdogTaskprivate classTimerService.Watcher
-
Field Summary
Fields Modifier and Type Field Description private TimerService.WatchdogTaskargosa recent, but not necessarily the most recent, watchdogprivate static intc1private static intc2private static intc3private static booleandebugStatsTimerService.WatchdogContextdefaultExecstatic java.util.concurrent.ThreadFactoryfactoryprivate java.util.concurrent.locks.Locklockprivate TimerPriorityHeaptimerHeapprivate java.util.concurrent.ScheduledExecutorServicetimerProxyprivate MPSCQueue<Timer>timerQueue
-
Constructor Summary
Constructors Constructor Description TimerService(TimerService.WatchdogContext doghouse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private longdoTrigger(long currentTime)private booleanempty()booleanisEmptyLazy(TimerService.WatchdogContext executor)return true if empty at a particular moment during the call allowing false negatives if operations are ongoingvoidshutdown()voidsubmit(Timer t)voidtrigger(TimerService.WatchdogContext doghouse)
-
-
-
Field Detail
-
timerHeap
private final TimerPriorityHeap timerHeap
-
timerProxy
private java.util.concurrent.ScheduledExecutorService timerProxy
-
lock
private final java.util.concurrent.locks.Lock lock
-
debugStats
private static boolean debugStats
-
argos
private volatile TimerService.WatchdogTask argos
a recent, but not necessarily the most recent, watchdog
-
c1
private static volatile int c1
-
c2
private static volatile int c2
-
c3
private static volatile int c3
-
factory
public static java.util.concurrent.ThreadFactory factory
-
defaultExec
public TimerService.WatchdogContext defaultExec
-
-
Constructor Detail
-
TimerService
public TimerService(TimerService.WatchdogContext doghouse)
-
-
Method Detail
-
shutdown
public void shutdown()
-
submit
public void submit(Timer t)
-
empty
private boolean empty()
-
isEmptyLazy
public boolean isEmptyLazy(TimerService.WatchdogContext executor)
return true if empty at a particular moment during the call allowing false negatives if operations are ongoing
-
trigger
public void trigger(TimerService.WatchdogContext doghouse)
-
doTrigger
private long doTrigger(long currentTime)
-
-