Class 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 Detail

      • SchedulerCommand

        public SchedulerCommand()
    • 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