Enum PushbackPolicyOption

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      FIXED
      Returns a fixed amount of back pressure, independent of how full the buffer is
      LINEAR
      Returns zero back pressure when the buffer is empty, then it returns a linearly increasing amount of back pressure based on how full the buffer is.
      ON_FULL_EXPONENTIAL
      Returns zero back pressure until the buffer is full, then it returns an exponentially increasing amount, starting with the supplied value and doubling it each time.
      ON_FULL_FIXED
      Returns zero back pressure until the buffer is full, then it returns a fixed value
    • 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>>>
      PushbackPolicy<T,​U>
      getPolicy​(long value)
      Create a PushbackPolicy instance configured with a base back pressure time in nanoseconds The actual backpressure returned will vary based on the selected implementation, the base value, and the state of the buffer.
      static PushbackPolicyOption valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static PushbackPolicyOption[] 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

      • FIXED

        public static final PushbackPolicyOption FIXED
        Returns a fixed amount of back pressure, independent of how full the buffer is
      • ON_FULL_FIXED

        public static final PushbackPolicyOption ON_FULL_FIXED
        Returns zero back pressure until the buffer is full, then it returns a fixed value
      • ON_FULL_EXPONENTIAL

        public static final PushbackPolicyOption ON_FULL_EXPONENTIAL
        Returns zero back pressure until the buffer is full, then it returns an exponentially increasing amount, starting with the supplied value and doubling it each time. Once the buffer is no longer full the back pressure returns to zero.
      • LINEAR

        public static final PushbackPolicyOption LINEAR
        Returns zero back pressure when the buffer is empty, then it returns a linearly increasing amount of back pressure based on how full the buffer is. The maximum value will be returned when the buffer is full.
    • Method Detail

      • values

        public static PushbackPolicyOption[] 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 (PushbackPolicyOption c : PushbackPolicyOption.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PushbackPolicyOption 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>>> PushbackPolicy<T,​U> getPolicy​(long value)
        Create a PushbackPolicy instance configured with a base back pressure time in nanoseconds The actual backpressure returned will vary based on the selected implementation, the base value, and the state of the buffer.
        Parameters:
        value -
        Returns:
        A PushbackPolicy to use