Class ECaccessScheduler
java.lang.Object
ecmwf.common.technical.ThreadService.ConfigurableRunnable
ecmwf.common.technical.WakeupThread
ecmwf.common.ecaccess.ECaccessScheduler
- All Implemented Interfaces:
MonitorCallback,Runnable
- Direct Known Subclasses:
MBeanScheduler
The Class ECaccessScheduler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe Constant NEXT_STEP_ABORT.static final intThe Constant NEXT_STEP_CONTINUE.static final intThe Constant NEXT_STEP_DELAY.static final intThe Constant NEXT_STEP_INIT.static final intThe Constant SCHEDULER_STATE_CLOSING.static final intThe Constant SCHEDULER_STATE_JAMMED.static final intThe Constant SCHEDULER_STATE_OFFLINE.static final intThe Constant SCHEDULER_STATE_ONHOLD.static final intThe Constant SCHEDULER_STATE_ONLINE.static final intThe Constant SCHEDULER_STATE_OPENING.protected static final String[]The Constant states.protected static final String[]The Constant steps. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigurable run.voidDeactivate monitor.Gets the activity.longgetDelay()Gets the delay.longGets the jammed timeout.longGets the last step time.getMonitorManager(String name) Gets the monitor manager.Gets the monitor name.intGets the next step.intGets the scheduler state.Gets the start date.longGets the step time.voidInitialize.booleanChecks if is initialized.booleanisJammed()Checks if is jammed.booleanisOnHold()Checks if is on hold.booleanChecks if is running.abstract intnextStep()Next step.voidonHold()On hold.voidsetDelay(long delay) Sets the delay.voidsetJammedTimeout(long timeout) Sets the jammed timeout.voidsetOnhold(boolean hold) Sets the onhold.voidsetTimeRanges(List<TimeRange> timeRanges) Sets the list of time ranges when it should be running.voidshutdown()Shutdown.voidstart()Start.voidwakeup()Wakeup.Methods inherited from class ecmwf.common.technical.WakeupThread
isSleeping, waitForMethods inherited from class ecmwf.common.technical.ThreadService.ConfigurableRunnable
execute, execute, getContextClassLoader, getPriority, getThreadName, interrupt, interrupted, isAlive, isStarted, join, join, run, setContextClassLoader, setForceCookie, setInheritCookie, setPriority, setThreadNameAndCookie
-
Field Details
-
SCHEDULER_STATE_ONLINE
public static final int SCHEDULER_STATE_ONLINEThe Constant SCHEDULER_STATE_ONLINE.- See Also:
-
SCHEDULER_STATE_OPENING
public static final int SCHEDULER_STATE_OPENINGThe Constant SCHEDULER_STATE_OPENING.- See Also:
-
SCHEDULER_STATE_CLOSING
public static final int SCHEDULER_STATE_CLOSINGThe Constant SCHEDULER_STATE_CLOSING.- See Also:
-
SCHEDULER_STATE_OFFLINE
public static final int SCHEDULER_STATE_OFFLINEThe Constant SCHEDULER_STATE_OFFLINE.- See Also:
-
SCHEDULER_STATE_JAMMED
public static final int SCHEDULER_STATE_JAMMEDThe Constant SCHEDULER_STATE_JAMMED.- See Also:
-
SCHEDULER_STATE_ONHOLD
public static final int SCHEDULER_STATE_ONHOLDThe Constant SCHEDULER_STATE_ONHOLD.- See Also:
-
NEXT_STEP_INIT
public static final int NEXT_STEP_INITThe Constant NEXT_STEP_INIT.- See Also:
-
NEXT_STEP_CONTINUE
public static final int NEXT_STEP_CONTINUEThe Constant NEXT_STEP_CONTINUE.- See Also:
-
NEXT_STEP_DELAY
public static final int NEXT_STEP_DELAYThe Constant NEXT_STEP_DELAY.- See Also:
-
NEXT_STEP_ABORT
public static final int NEXT_STEP_ABORTThe Constant NEXT_STEP_ABORT.- See Also:
-
states
The Constant states. -
steps
The Constant steps.
-
-
Constructor Details
-
ECaccessScheduler
public ECaccessScheduler()
-
-
Method Details
-
shutdown
public void shutdown()Shutdown. -
isInitialized
public boolean isInitialized()Checks if is initialized.- Returns:
- true, if is initialized
-
isRunning
public boolean isRunning()Checks if is running.- Returns:
- true, if is running
-
isJammed
public boolean isJammed()Checks if is jammed.- Returns:
- true, if is jammed
-
isOnHold
public boolean isOnHold()Checks if is on hold. Checks if is on hold.- Overrides:
isOnHoldin classWakeupThread- Returns:
- true, if is on hold
-
wakeup
-
setOnhold
public void setOnhold(boolean hold) Sets the onhold. Sets the onhold.- Overrides:
setOnholdin classWakeupThread- Parameters:
hold- the new onhold
-
setTimeRanges
-
setJammedTimeout
public void setJammedTimeout(long timeout) Sets the jammed timeout.- Parameters:
timeout- the new jammed timeout
-
getJammedTimeout
public long getJammedTimeout()Gets the jammed timeout.- Returns:
- the jammed timeout
-
getDelay
public long getDelay()Gets the delay.- Returns:
- the delay
-
getStartDate
-
getMonitorName
-
getSchedulerState
public int getSchedulerState()Gets the scheduler state.- Returns:
- the scheduler state
-
getStepTime
public long getStepTime()Gets the step time.- Returns:
- the step time
-
getNextStep
public int getNextStep()Gets the next step.- Returns:
- the next step
-
getLastStepTime
public long getLastStepTime()Gets the last step time.- Returns:
- the last step time
-
getActivity
-
getMonitorManager
Gets the monitor manager. Gets the monitor manager.- Specified by:
getMonitorManagerin interfaceMonitorCallback- Parameters:
name- the name- Returns:
- the monitor manager
- Throws:
MonitorException- the monitor exception
-
initialize
public void initialize()Initialize. -
onHold
public void onHold()On hold. -
setDelay
public void setDelay(long delay) Sets the delay.- Parameters:
delay- the new delay
-
deactivateMonitor
public void deactivateMonitor()Deactivate monitor. -
start
public void start()Start. -
nextStep
public abstract int nextStep()Next step.- Returns:
- the int
-
configurableRun
public void configurableRun()Configurable run. Configurable run.- Specified by:
configurableRunin classThreadService.ConfigurableRunnable
-