Class Seize

    • Method Detail

      • getPriority

        public final int getPriority()
        Gets the queuing priority associated with this QObject
        Returns:
        The priority as an integer
      • getQueue

        public final Queue getQueue()
        Returns the queue that the QObject was last enqueued within
        Returns:
        The Queue, or null if no queue
      • execute

        public void execute()
        Description copied from class: ProcessCommand
        The execute method is responsible for executing the command
        Specified by:
        execute in class ProcessCommand
      • setPriority

        protected final void setPriority​(int priority)
        Sets the priority for this Seize Changing the priority while the object is in a queue has no effect on the ordering of the queue. This priority is only used to determine competition between multiple seizes of the same resource
        Parameters:
        priority - lower priority implies earlier ranking in the queue
      • setAmountRequested

        protected final void setAmountRequested​(Variable amountRequested)
      • setResource

        protected final void setResource​(Resource resource)
      • setQueue

        protected final void setQueue​(Queue<Entity> queue)