Enum QueuePolicyOption

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BLOCK
      Attempt to add the supplied event to the queue, blocking until the enqueue is successful.
      DISCARD_OLDEST
      Attempt to add the supplied event to the queue.
      FAIL
      Attempt to add the supplied event to the queue, throwing an exception if the queue is full.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract <T,​U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
      QueuePolicy<T,​U>
      getPolicy()  
      static QueuePolicyOption valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static QueuePolicyOption[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • DISCARD_OLDEST

        public static final QueuePolicyOption DISCARD_OLDEST
        Attempt to add the supplied event to the queue. If the queue is unable to immediately accept the value then discard the value at the head of the queue and try again. Repeat this process until the event is enqueued.
      • BLOCK

        public static final QueuePolicyOption BLOCK
        Attempt to add the supplied event to the queue, blocking until the enqueue is successful.
      • FAIL

        public static final QueuePolicyOption FAIL
        Attempt to add the supplied event to the queue, throwing an exception if the queue is full.
    • Method Detail

      • values

        public static QueuePolicyOption[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (QueuePolicyOption c : QueuePolicyOption.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static QueuePolicyOption valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getPolicy

        public abstract <T,​U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> QueuePolicy<T,​U> getPolicy()
        Returns:
        a QueuePolicy implementation