public class BundleStatusTransitXCommand extends StatusTransitXCommand
DEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, dryrun, eventService, instrumentation, INSTRUMENTATION_GROUP, LOG
Constructor and Description |
---|
BundleStatusTransitXCommand(String id) |
Modifier and Type | Method and Description |
---|---|
String |
getEntityKey()
Return the entity key for the command.
|
protected Job.Status |
getJobStatus()
Gets the job status.
|
protected Job.Status |
getPausedState()
Gets the job pause state.
|
protected Job.Status |
getRunningState()
Gets the job running state.
|
protected Job.Status |
getSuspendedStatus()
Gets the suspended status.
|
protected Job.Status |
getTerminalStatus()
Gets the job terminal status.
|
protected boolean |
isPausedState()
Checks if job is in paused state.
|
protected boolean |
isRunningState()
Checks if job is in running state.
|
protected boolean |
isSuspendedState()
Checks if is in suspended state.
|
protected boolean |
isTerminalState()
Checks if job is in terminal state.
|
protected void |
loadState()
Load the necessary state to perform the precondition check and to execute the command.
|
protected void |
updateJobStatus(Job.Status bundleStatus)
Update job status.
|
protected void |
verifyPrecondition()
Verify the precondition for the command after a lock has been obtain, just before executing the command.
|
execute, getLockTimeOut, isLockRequired, isReQueueRequired
call, eagerLoadState, eagerVerifyPrecondition, executeInterrupts, getCreatedTime, getInstrumentation, getKey, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, queue, queue, resetUsed, setInterruptMode, setLogInfo, toString
public BundleStatusTransitXCommand(String id)
public String getEntityKey()
XCommand
getEntityKey
in interface XCallable<Void>
getEntityKey
in class XCommand<Void>
protected void loadState() throws CommandException
XCommand
Subclasses must implement this method and load the state needed to do the precondition check and execute the command.
loadState
in class XCommand<Void>
CommandException
protected Job.Status getJobStatus() throws CommandException
StatusTransitXCommand
getJobStatus
in class StatusTransitXCommand
CommandException
- the command exceptionprotected boolean isTerminalState()
StatusTransitXCommand
isTerminalState
in class StatusTransitXCommand
protected Job.Status getTerminalStatus()
StatusTransitXCommand
getTerminalStatus
in class StatusTransitXCommand
protected boolean isPausedState()
StatusTransitXCommand
isPausedState
in class StatusTransitXCommand
protected Job.Status getPausedState()
StatusTransitXCommand
getPausedState
in class StatusTransitXCommand
protected boolean isSuspendedState()
StatusTransitXCommand
isSuspendedState
in class StatusTransitXCommand
protected Job.Status getSuspendedStatus()
StatusTransitXCommand
getSuspendedStatus
in class StatusTransitXCommand
protected boolean isRunningState()
StatusTransitXCommand
isRunningState
in class StatusTransitXCommand
protected Job.Status getRunningState()
StatusTransitXCommand
getRunningState
in class StatusTransitXCommand
protected void updateJobStatus(Job.Status bundleStatus) throws JPAExecutorException
StatusTransitXCommand
updateJobStatus
in class StatusTransitXCommand
bundleStatus
- the statusJPAExecutorException
- the JPA executor exceptionprotected void verifyPrecondition() throws CommandException, PreconditionException
XCommand
verifyPrecondition
in class XCommand<Void>
CommandException
- thrown if the precondition is not met.PreconditionException
Copyright © 2018 Apache Software Foundation. All rights reserved.