Class Queues

java.lang.Object
com.oracle.coherence.concurrent.Queues

public class Queues extends Object
A factory to obtain named blocking queues.
  • Field Details

    • QUEUE_CACHE_PREFIX

      public static final String QUEUE_CACHE_PREFIX
      The prefix use for queue cache names.
      See Also:
    • SESSION_NAME

      public static final String SESSION_NAME
      The session name.
    • BUILDER

      public static final com.tangosol.internal.net.queue.NamedCacheDequeBuilder BUILDER
      The NamedCacheDequeBuilder used to ensure a blocking queue is created from the concurrent session with the correct name suffix.
  • Constructor Details

    • Queues

      public Queues()
  • Method Details

    • blockingDeque

      public static <E> NamedBlockingDeque<E> blockingDeque(String sName)
      Type Parameters:
      E - the type of element in the queue
      Parameters:
      sName - the name of the queue to return
      Returns:
      a NamedBlockingDeque with the specified name
    • blocking

      public static <E> NamedBlockingQueue<E> blocking(String sName)
      Type Parameters:
      E - the type of element in the queue
      Parameters:
      sName - the name of the queue to return
      Returns:
      a NamedBlockingQueue with the specified name
    • session

      protected static Session session()
      Return Coherence Session for the Semaphore module.
      Returns:
      Coherence Session for the Semaphore module
    • ensureQueue

      protected static <E> NamedBlockingDeque<E> ensureQueue(String sName)
      Type Parameters:
      E - the element type of the queue
      Parameters:
      sName - the queue name; if null or empty, the default queue will be returned
      Returns:
      the queue for the given name