Enum JerseyPublisher.PublisherStrategy

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BEST_EFFORT
      Best effort publisher strategy - tries to deliver to all subscribers if possible without blocking the processing.
      BLOCKING
      Blocking publisher strategy - tries to deliver to all subscribers regardless the cost.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PublisherStrategy()  
    • Method Summary

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

      • BLOCKING

        public static final JerseyPublisher.PublisherStrategy BLOCKING
        Blocking publisher strategy - tries to deliver to all subscribers regardless the cost. The thread is blocked uninterruptibly while resources for any subscriber are unavailable. This strategy comes with a risk of thread exhaustion, that will lead to publisher being completely blocked by slow or incorrectly implemented subscribers.
      • BEST_EFFORT

        public static final JerseyPublisher.PublisherStrategy BEST_EFFORT
        Best effort publisher strategy - tries to deliver to all subscribers if possible without blocking the processing. If the buffer is full, publisher invokes onError() and cancels subscription on a subscriber, that is not capable of read the messages at a speed sufficient to unblock the processing.
    • Constructor Detail

      • PublisherStrategy

        private PublisherStrategy()
    • Method Detail

      • values

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

        public static JerseyPublisher.PublisherStrategy 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