public class SchedulerCommand extends Object
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 and Description |
|---|
SchedulerCommand() |
| Modifier and Type | Method and Description |
|---|---|
SchedulerAction |
getAction()
Returns the scheduler action to execute.
|
int |
getSize()
Calculates and returns the total memory size occupied by
this scheduler command.
|
Object |
getState()
Returns the optional scheduler command state object which
provides additional information about the scheduler command.
|
void |
setAction(SchedulerAction action)
Sets the scheduler action to execute.
|
void |
setState(Object state)
Sets the optional scheduler command state object which
provides additional information about the scheduler command.
|
public SchedulerAction getAction()
public void setAction(SchedulerAction action)
action - The new scheduler action. Null references are ignoredpublic Object getState()
public void setState(Object state)
state - The new scheduler command state object. Can be nullpublic int getSize()
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.
Copyright © 2023. All rights reserved.