T - public abstract class RerunTransitionXCommand<T> extends TransitionXCommand<T>
updateJob() : update job status and attributes rerunChildren() : submit or queue commands to rerun children notifyParent() : update the status to upstream if any
| Modifier and Type | Field and Description | 
|---|---|
protected String | 
jobId  | 
protected Job.Status | 
prevStatus  | 
protected T | 
ret  | 
insertList, job, updateListDEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, dryrun, eventService, instrumentation, INSTRUMENTATION_GROUP, LOG| Constructor and Description | 
|---|
RerunTransitionXCommand(String name,
                                              String type,
                                              int priority)
The constructor for abstract class  
RerunTransitionXCommand | 
RerunTransitionXCommand(String name,
                                              String type,
                                              int priority,
                                              boolean dryrun)
The constructor for abstract class  
RerunTransitionXCommand | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
eagerLoadState()
Load the necessary state to perform an eager precondition check. 
 | 
protected void | 
eagerVerifyPrecondition()
Verify the precondition for the command before obtaining a lock. 
 | 
protected T | 
execute()
Command execution body. 
 | 
Job.Status | 
getPrevStatus()
This method will return the previous status. 
 | 
abstract void | 
rerunChildren()
Rerun actions associated with the job 
 | 
void | 
transitToNext()
Transit to the next status based on the result of the Job. 
 | 
protected void | 
verifyPrecondition()
Verify the precondition for the command after a lock has been obtain, just before executing the command. 
 | 
generateEvents, getJob, notifyParent, performWrites, setJob, updateJobcall, executeInterrupts, getCreatedTime, getEntityKey, getInstrumentation, getKey, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isLockRequired, isReQueueRequired, loadState, queue, queue, resetUsed, setInterruptMode, setLogInfo, toStringprotected Job.Status prevStatus
public RerunTransitionXCommand(String name, String type, int priority)
RerunTransitionXCommandname - the command nametype - the command typepriority - the command prioritypublic RerunTransitionXCommand(String name, String type, int priority, boolean dryrun)
RerunTransitionXCommandname - the command nametype - the command typepriority - the command prioritydryrun - true if dryrun is enablepublic void transitToNext()
TransitionXCommandtransitToNext in class TransitionXCommand<T>public abstract void rerunChildren() throws CommandException
CommandException - thrown if failed to rerun actionsprotected T execute() throws CommandException
XCommandThis method will be invoked after the {link #loadState} and {link #verifyPrecondition} methods.
If the command requires locking, this method will be invoked ONLY if the lock has been acquired.
execute in class TransitionXCommand<T>CommandException - thrown if the command execution failed.protected void verifyPrecondition() throws CommandException, PreconditionException
XCommandverifyPrecondition in class XCommand<T>CommandException - thrown if the precondition is not met.PreconditionExceptionprotected void eagerLoadState() throws CommandException
XCommandThis implementation does a NOP.
Subclasses should override this method and load the state needed to do an eager precondition check.
A trivial implementation is calling {link #loadState}.
eagerLoadState in class XCommand<T>CommandExceptionprotected void eagerVerifyPrecondition() throws CommandException, PreconditionException
XCommandThis implementation does a NOP.
A trivial implementation is calling {link #verifyPrecondition}.
eagerVerifyPrecondition in class XCommand<T>CommandException - thrown if the precondition is not met.PreconditionExceptionpublic Job.Status getPrevStatus()
Copyright © 2016 Apache Software Foundation. All rights reserved.