|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.utils.handlers.GCUBEHandler<HANDLED>
org.gcube.common.core.utils.handlers.GCUBEScheduledHandler<Void>
org.gcube.data.tm.publishers.ResilientScheduler
public class ResilientScheduler
A GCUBEScheduledHandler which tolerates failure for a maximum number of times.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.gcube.common.core.utils.handlers.GCUBEScheduledHandler |
|---|
org.gcube.common.core.utils.handlers.GCUBEScheduledHandler.Mode |
| Field Summary |
|---|
| Fields inherited from class org.gcube.common.core.utils.handlers.GCUBEScheduledHandler |
|---|
exception, exceptionCount, interval, repeat |
| Fields inherited from class org.gcube.common.core.utils.handlers.GCUBEHandler |
|---|
handled, logger, producer |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEScheduledHandler |
|---|
getInterval, getMode, getScheduled, onIteration, run, setInterval, setMode, setScheduled, stop |
| Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEHandler |
|---|
clearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, getState, notify, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, setState, subscribe, undo, unsubscribe |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.gcube.common.core.utils.handlers.lifetime.Lifetime |
|---|
getState |
| Methods inherited from interface org.gcube.common.core.utils.handlers.GCUBEIHandler |
|---|
clearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, subscribe, undo, unsubscribe |
| Constructor Detail |
|---|
public ResilientScheduler(long interval,
org.gcube.common.core.utils.handlers.GCUBEScheduledHandler.Mode mode)
interval - the time interval in seconds.mode - the execution mode.| Method Detail |
|---|
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 delay
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||