public class ResilientScheduler extends org.gcube.common.core.utils.handlers.GCUBEScheduledHandler<Void>
GCUBEScheduledHandler which tolerates failure for a maximum number of times.| Constructor and Description |
|---|
ResilientScheduler(long interval,
org.gcube.common.core.utils.handlers.GCUBEScheduledHandler.Mode mode)
Creates an instance with a given execution mode, time interval, and scheduled handler.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAttempts()
Returns the number of publication attempts.
|
long |
getDelay()
Returns the interval between publication attempts.
|
protected boolean |
repeat(Exception exception,
int exceptionCount) |
void |
setAttempts(int attempts)
Sets the number of publication attempts;
|
void |
setDelay(long delay)
Sets the interval between publication attempts.
|
getInterval, getMode, getScheduled, onIteration, run, setInterval, setMode, setScheduled, stopclearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, getState, notify, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, setState, subscribe, undo, unsubscribeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, subscribe, undo, unsubscribepublic ResilientScheduler(long interval,
org.gcube.common.core.utils.handlers.GCUBEScheduledHandler.Mode mode)
interval - the time interval in seconds.mode - the execution mode.protected boolean repeat(Exception exception, int exceptionCount)
repeat in class org.gcube.common.core.utils.handlers.GCUBEScheduledHandler<Void>public int getAttempts()
public void setAttempts(int attempts)
attempts - the attempts.public long getDelay()
public void setDelay(long delay)
delay - the delayCopyright © 2014. All Rights Reserved.