Package org.apache.shenyu.common.timer
Class HierarchicalWheelTimer
- java.lang.Object
-
- org.apache.shenyu.common.timer.HierarchicalWheelTimer
-
-
Constructor Summary
Constructors Constructor Description HierarchicalWheelTimer(java.lang.String executorName)Instantiates a new System timer.HierarchicalWheelTimer(java.lang.String executorName, java.lang.Long tickMs, java.lang.Integer wheelSize, java.lang.Long startMs)Instantiates a new System timer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(TimerTask timerTask)Add timer task.voidadvanceClock(long timeoutMs)Advance clock boolean.voidshutdown()Shutdown.intsize()Size int.
-
-
-
Constructor Detail
-
HierarchicalWheelTimer
public HierarchicalWheelTimer(java.lang.String executorName)
Instantiates a new System timer.- Parameters:
executorName- the executor name
-
HierarchicalWheelTimer
public HierarchicalWheelTimer(java.lang.String executorName, java.lang.Long tickMs, java.lang.Integer wheelSize, java.lang.Long startMs)Instantiates a new System timer.- Parameters:
executorName- the executor nametickMs- the tick mswheelSize- the wheel sizestartMs- the start ms
-
-
Method Detail
-
advanceClock
public void advanceClock(long timeoutMs) throws java.lang.InterruptedExceptionDescription copied from interface:TimerAdvance clock boolean.- Specified by:
advanceClockin interfaceTimer- Parameters:
timeoutMs- the timeout ms- Throws:
java.lang.InterruptedException- the interrupted exception
-
size
public int size()
Description copied from interface:TimerSize int.
-
-