Enum BackPressureStrategy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<BackPressureStrategy>

    public enum BackPressureStrategy
    extends java.lang.Enum<BackPressureStrategy>
    The back pressure strategies.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BUFFER
      Buffer the events.
      DROP
      Drop the incoming item events if the downstream is not ready to receive it.
      ERROR
      Fire a failure with a BackPressureFailure when the downstream can't keep up
      IGNORE
      Ignore downstream back-pressure requests.
      LATEST
      Drop the oldest item events from the buffer so the downstream will get only the latest items from upstream.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static BackPressureStrategy valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static BackPressureStrategy[] 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

      • BUFFER

        public static final BackPressureStrategy BUFFER
        Buffer the events. While being generally the default, be aware that this strategy may cause OutOfMemoryError as it uses unbounded buffer.
      • DROP

        public static final BackPressureStrategy DROP
        Drop the incoming item events if the downstream is not ready to receive it.
      • IGNORE

        public static final BackPressureStrategy IGNORE
        Ignore downstream back-pressure requests. Basically it pushes items downstream as they come.

        This may cause an BackPressureFailure to be fired when queues get full downstream.

      • LATEST

        public static final BackPressureStrategy LATEST
        Drop the oldest item events from the buffer so the downstream will get only the latest items from upstream.
    • Method Detail

      • values

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

        public static BackPressureStrategy 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