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 int
The Constant NEXT_STEP_ABORT.static final int
The Constant NEXT_STEP_CONTINUE.static final int
The Constant NEXT_STEP_DELAY.static final int
The Constant NEXT_STEP_INIT.static final int
The Constant SCHEDULER_STATE_CLOSING.static final int
The Constant SCHEDULER_STATE_JAMMED.static final int
The Constant SCHEDULER_STATE_OFFLINE.static final int
The Constant SCHEDULER_STATE_ONHOLD.static final int
The Constant SCHEDULER_STATE_ONLINE.static final int
The 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 TypeMethodDescriptionvoid
Configurable run.void
Deactivate monitor.Gets the activity.long
getDelay()
Gets the delay.long
Gets the jammed timeout.long
Gets the last step time.getMonitorManager
(String name) Gets the monitor manager.Gets the monitor name.int
Gets the next step.int
Gets the scheduler state.Gets the start date.long
Gets the step time.void
Initialize.boolean
Checks if is initialized.boolean
isJammed()
Checks if is jammed.boolean
isOnHold()
Checks if is on hold.boolean
Checks if is running.abstract int
nextStep()
Next step.void
onHold()
On hold.void
setDelay
(long delay) Sets the delay.void
setJammedTimeout
(long timeout) Sets the jammed timeout.void
setOnhold
(boolean hold) Sets the onhold.void
setTimeRanges
(List<TimeRange> timeRanges) Sets the list of time ranges when it should be running.void
shutdown()
Shutdown.void
start()
Start.void
wakeup()
Wakeup.Methods inherited from class ecmwf.common.technical.WakeupThread
isSleeping, waitFor
Methods 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:
isOnHold
in classWakeupThread
- Returns:
- true, if is on hold
-
wakeup
-
setOnhold
public void setOnhold(boolean hold) Sets the onhold. Sets the onhold.- Overrides:
setOnhold
in 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:
getMonitorManager
in 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:
configurableRun
in classThreadService.ConfigurableRunnable
-