Class NodeEventQueue


  • public class NodeEventQueue
    extends java.lang.Object
    Node Event Queue Class
    Author:
    gkspencer
    • Constructor Detail

      • NodeEventQueue

        public NodeEventQueue()
        Class constructor
    • Method Detail

      • numberOfEvents

        public final int numberOfEvents()
        Return the number of events in the queue
        Returns:
        int
      • addEvent

        public final void addEvent​(NodeEvent event)
        Add an event to the queue
        Parameters:
        event - NodeEvent
      • removeEvent

        public final NodeEvent removeEvent()
                                    throws java.lang.InterruptedException
        Remove an event from the head of the queue
        Returns:
        NodeEvent
        Throws:
        java.lang.InterruptedException
      • removeSessionNoWait

        public final NodeEvent removeSessionNoWait()
        Remove an event from the queue, without waiting if there are no events in the queue
        Returns:
        NodeEvent
      • waitWhileEmpty

        public final void waitWhileEmpty()
                                  throws java.lang.InterruptedException
        Wait for an event to be added to the queue
        Throws:
        java.lang.InterruptedException
      • waitUntilEmpty

        public final void waitUntilEmpty()
                                  throws java.lang.InterruptedException
        Wait for the event queue to be emptied
        Throws:
        java.lang.InterruptedException