Class TaskQueueSimEvent<T>

java.lang.Object
org.bzdev.devqsim.SimulationEvent
org.bzdev.devqsim.TaskQueueSimEvent<T>
All Implemented Interfaces:
Comparable<SimulationEvent>

public class TaskQueueSimEvent<T> extends SimulationEvent
Simulation event for task queues. This class represents the elements that will be stored on a TaskQueue's internal queue. The parameter T is the class for arguments used to pass data associated with a task (e.g., the time to wait before the task is activated once it reaches the head of the queue. It should match the parameter used for the matching TaskQueue.
  • Method Details

    • cancel

      public boolean cancel()
      Description copied from class: SimulationEvent
      Cancel an event. The default behavior is to deschedule the event from the simulation's event queue. Subclasses should perform any additional processing and also call super.cancel() or deschedule the event explicitly.
      Overrides:
      cancel in class SimulationEvent
      Returns:
      true if the event could be canceled; false otherwise
    • isCanceled

      public boolean isCanceled()
      Description copied from class: SimulationEvent
      Check if an event was canceled.
      Overrides:
      isCanceled in class SimulationEvent
      Returns:
      true if the current event was canceled; false otherwise
    • processEvent

      protected void processEvent()
      Description copied from class: SimulationEvent
      Process an event. This method will be invoked by the simulation scheduler when the event should occur. Subclasses must implement it if any processing is to occur.
      Specified by:
      processEvent in class SimulationEvent