public abstract class TriggerTask<T> extends CUTask<T>
CUTask.ContainerListener<T>, CUTask.Context
Modifier and Type | Field and Description |
---|---|
protected boolean |
done |
protected ManagedScheduledExecutorServiceImpl |
executorService |
protected java.util.concurrent.atomic.AtomicReference<java.util.concurrent.Future<T>> |
futureRef |
protected java.lang.String |
id |
protected LastExecution |
lastExecution |
protected java.util.Date |
scheduledTime |
protected boolean |
skipped |
protected Trigger |
trigger |
delegate, executor, future
Modifier | Constructor and Description |
---|---|
protected |
TriggerTask(java.lang.Object original,
ManagedScheduledExecutorServiceImpl es,
Trigger trigger,
java.util.Date taskScheduledTime,
java.lang.String id,
java.util.concurrent.atomic.AtomicReference<java.util.concurrent.Future<T>> ref) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
doInvoke() |
java.lang.String |
getId() |
LastExecution |
getLastExecution() |
T |
getResult() |
T |
invoke() |
boolean |
isDone() |
boolean |
isSkipped() |
protected long |
nextDelay(java.util.Date next) |
void |
stop() |
addContainerListener, compareTo, invoke
getDelegate, taskAborted, taskAborted, taskDone, taskStarting, taskSubmitted
protected final ManagedScheduledExecutorServiceImpl executorService
protected final Trigger trigger
protected final java.util.Date scheduledTime
protected final java.lang.String id
protected final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.Future<T>> futureRef
protected LastExecution lastExecution
protected volatile boolean skipped
protected volatile boolean done
protected TriggerTask(java.lang.Object original, ManagedScheduledExecutorServiceImpl es, Trigger trigger, java.util.Date taskScheduledTime, java.lang.String id, java.util.concurrent.atomic.AtomicReference<java.util.concurrent.Future<T>> ref)
public T invoke() throws java.lang.Exception
java.lang.Exception
protected long nextDelay(java.util.Date next)
protected abstract T doInvoke() throws java.lang.Exception
java.lang.Exception
public java.lang.String getId()
public void stop()
public boolean isDone()
public T getResult()
public boolean isSkipped()
public LastExecution getLastExecution()