Enum Class JerseyPublisher.PublisherStrategy
java.lang.Object
java.lang.Enum<JerseyPublisher.PublisherStrategy>
org.glassfish.jersey.internal.util.JerseyPublisher.PublisherStrategy
- All Implemented Interfaces:
Serializable
,Comparable<JerseyPublisher.PublisherStrategy>
,java.lang.constant.Constable
- Enclosing class:
- JerseyPublisher<T>
public static enum JerseyPublisher.PublisherStrategy
extends Enum<JerseyPublisher.PublisherStrategy>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBest effort publisher strategy - tries to deliver to all subscribers if possible without blocking the processing.Blocking publisher strategy - tries to deliver to all subscribers regardless the cost. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static JerseyPublisher.PublisherStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Best effort publisher strategy - tries to deliver to all subscribers if possible without blocking the processing. If the buffer is full, publisher invokesonError()
and cancels subscription on a subscriber, that is not capable of read the messages at a speed sufficient to unblock the processing.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-