Documentation of 'com.ziclix.python.sql.util.Queue' Java class
Queue
com.ziclix.python.sql.util

Class Queue



  • public class Queue
    extends java.lang.Object
    This queue blocks until closed or an element is enqueued. If the queue reaches capacity, the dequeue thread gets priority in order to bring the queue size under a certain threshold.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Queue()
      Instantiate a blocking queue with no bounded capacity.
      Queue(int capacity)
      Instantiate a blocking queue with the specified capacity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close()
      Close the queue and notify all waiting Threads.
      java.lang.Object dequeue()
      Blocks until an object is dequeued or the queue is closed.
      void enqueue(java.lang.Object element)
      Enqueue an object and notify all waiting Threads.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Queue

        public Queue()
        Instantiate a blocking queue with no bounded capacity.
      • Queue

        public Queue(int capacity)
        Instantiate a blocking queue with the specified capacity.
    • Method Detail

      • enqueue

        public void enqueue(java.lang.Object element)
                     throws java.lang.InterruptedException
        Enqueue an object and notify all waiting Threads.
        Throws:
        java.lang.InterruptedException
      • dequeue

        public java.lang.Object dequeue()
                                 throws java.lang.InterruptedException
        Blocks until an object is dequeued or the queue is closed.
        Throws:
        java.lang.InterruptedException
      • close

        public void close()
        Close the queue and notify all waiting Threads.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.