Class SchedulerCommand
- java.lang.Object
-
- com.gurock.smartinspect.scheduler.SchedulerCommand
-
public class SchedulerCommand extends Object
Represents a scheduler command as used by the Scheduler class and the asynchronous protocol mode.This class is used by the Scheduler class to enqueue protocol operations for later execution when operating in asynchronous mode. For detailed information about the asynchronous protocol mode, please refer to Protocol.isValidOption.
This class is not guaranteed to be threadsafe.
-
-
Constructor Summary
Constructors Constructor Description SchedulerCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchedulerActiongetAction()Returns the scheduler action to execute.intgetSize()Calculates and returns the total memory size occupied by this scheduler command.ObjectgetState()Returns the optional scheduler command state object which provides additional information about the scheduler command.voidsetAction(SchedulerAction action)Sets the scheduler action to execute.voidsetState(Object state)Sets the optional scheduler command state object which provides additional information about the scheduler command.
-
-
-
Method Detail
-
getAction
public SchedulerAction getAction()
Returns the scheduler action to execute. Please refer to the documentation of the SchedulerAction class for more information about possible values.- Returns:
- The scheduler action to execute
-
setAction
public void setAction(SchedulerAction action)
Sets the scheduler action to execute. Please refer to the documentation of the SchedulerAction class for more information about possible values.- Parameters:
action- The new scheduler action. Null references are ignored
-
getState
public Object getState()
Returns the optional scheduler command state object which provides additional information about the scheduler command. This method can return null.- Returns:
- The optional scheduler command state object, can be null
-
setState
public void setState(Object state)
Sets the optional scheduler command state object which provides additional information about the scheduler command.- Parameters:
state- The new scheduler command state object. Can be null
-
getSize
public int getSize()
Calculates and returns the total memory size occupied by this scheduler command.This method returns the total occupied memory size of this scheduler command. This functionality is used by the asynchronous protocol mode to track the total size of scheduler commands.
- Returns:
- total memory size
-
-