Package icu.easyj.core.clock
Class AutoRefreshHighAccuracyTickClock
java.lang.Object
icu.easyj.core.clock.WrapperTickClock
icu.easyj.core.clock.RefreshableTickClock
icu.easyj.core.clock.HighAccuracyRefreshableTickClock
icu.easyj.core.clock.AutoRefreshHighAccuracyTickClock
- All Implemented Interfaces:
IAutoRefreshTickClock,IClock,IRefreshableTickClock,ITickClock,IWrapperTickClock,Comparable<ITickClock>,Destroyable
public class AutoRefreshHighAccuracyTickClock
extends HighAccuracyRefreshableTickClock
implements IAutoRefreshTickClock
可自动刷新的高精准记号时钟
- Author:
- wangliang181230
-
Field Summary
Fields inherited from class icu.easyj.core.clock.HighAccuracyRefreshableTickClock
DEFAULT_TRY_COUNT, MIN_TRY_COUNT -
Constructor Summary
ConstructorsConstructorDescriptionAutoRefreshHighAccuracyTickClock(String name, ScheduledThreadPoolExecutor scheduledThreadPoolExecutor, Supplier<ITickClock> tickClockSupplier) AutoRefreshHighAccuracyTickClock(String name, ScheduledThreadPoolExecutor scheduledThreadPoolExecutor, Supplier<ITickClock> tickClockSupplier, int tryCount) AutoRefreshHighAccuracyTickClock(String name, Supplier<ITickClock> tickClockSupplier) AutoRefreshHighAccuracyTickClock(String name, Supplier<ITickClock> tickClockSupplier, int tryCount) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()boolean判断是否正在自动刷新booleanvoid开始自动刷新void停止自动刷新Methods inherited from class icu.easyj.core.clock.HighAccuracyRefreshableTickClock
getTryCount, refreshTickClockMethods inherited from class icu.easyj.core.clock.RefreshableTickClock
createClock, getTickClockSupplier, initMethods inherited from class icu.easyj.core.clock.WrapperTickClock
currentTimeNanos, getBaseEpochMicros, getBaseTickNanos, getTickClock, setTickClockMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface icu.easyj.core.clock.IClock
currentTimeMicros, currentTimeMillis, currentTimeNanos, nowMethods inherited from interface icu.easyj.core.clock.IRefreshableTickClock
getTickClockSupplier, refreshTickClockMethods inherited from interface icu.easyj.core.clock.ITickClock
compareTo, getBaseEpochMicros, getBaseTickNanos, getPassedNanos
-
Constructor Details
-
AutoRefreshHighAccuracyTickClock
public AutoRefreshHighAccuracyTickClock(String name, ScheduledThreadPoolExecutor scheduledThreadPoolExecutor, @NonNull Supplier<ITickClock> tickClockSupplier, int tryCount) -
AutoRefreshHighAccuracyTickClock
public AutoRefreshHighAccuracyTickClock(String name, ScheduledThreadPoolExecutor scheduledThreadPoolExecutor, @NonNull Supplier<ITickClock> tickClockSupplier) -
AutoRefreshHighAccuracyTickClock
public AutoRefreshHighAccuracyTickClock(String name, @NonNull Supplier<ITickClock> tickClockSupplier, int tryCount) -
AutoRefreshHighAccuracyTickClock
public AutoRefreshHighAccuracyTickClock(String name, @NonNull Supplier<ITickClock> tickClockSupplier)
-
-
Method Details
-
startAutoRefresh
public void startAutoRefresh()Description copied from interface:IAutoRefreshTickClock开始自动刷新- Specified by:
startAutoRefreshin interfaceIAutoRefreshTickClock
-
stopAutoRefresh
public void stopAutoRefresh()Description copied from interface:IAutoRefreshTickClock停止自动刷新- Specified by:
stopAutoRefreshin interfaceIAutoRefreshTickClock
-
isAutoRefreshing
public boolean isAutoRefreshing()Description copied from interface:IAutoRefreshTickClock判断是否正在自动刷新- Specified by:
isAutoRefreshingin interfaceIAutoRefreshTickClock- Returns:
- 是否正在自动刷新
-
destroy
- Specified by:
destroyin interfaceDestroyable- Throws:
DestroyFailedException
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-