Package org.bedework.synch
Class SynchTimer
- java.lang.Object
-
- org.bedework.synch.SynchTimer
-
- All Implemented Interfaces:
org.bedework.util.logging.Logged
public class SynchTimer extends Object implements org.bedework.util.logging.Logged
Subscriptions which are waiting for a period before resynching. These are generally the polled kind but other subscriptions may be made to wait before retrying failed operations.- Author:
- Mike Douglass douglm rpi.edu
-
-
Constructor Summary
Constructors Constructor Description SynchTimer(SynchEngine syncher)Start the SynchTimer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bedework.util.logging.BwLoggergetLogger()longgetMaxWaitingCt()List<Stat>getStats()Get the current statslonggetWaitingCt()voidschedule(Subscription sub, long delay)Schedule a subscription after the given delayvoidschedule(Subscription sub, Date when)Schedule a subscription for the given timevoidstop()Stop our timer thread.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warn
-
-
-
-
Constructor Detail
-
SynchTimer
public SynchTimer(SynchEngine syncher)
Start the SynchTimer- Parameters:
syncher- the synch engine
-
-
Method Detail
-
stop
public void stop()
Stop our timer thread.
-
schedule
public void schedule(Subscription sub, Date when)
Schedule a subscription for the given time- Parameters:
sub- the subscriptionwhen- to process it
-
schedule
public void schedule(Subscription sub, long delay)
Schedule a subscription after the given delay- Parameters:
sub- the subscriptiondelay- - delay in milliseconds before subscription is processed.
-
getWaitingCt
public long getWaitingCt()
- Returns:
- number waiting
-
getMaxWaitingCt
public long getMaxWaitingCt()
- Returns:
- number waiting
-
getLogger
public org.bedework.util.logging.BwLogger getLogger()
- Specified by:
getLoggerin interfaceorg.bedework.util.logging.Logged
-
-