Package com.rabbitmq.stream
Enum StreamCreator.LeaderLocator
- All Implemented Interfaces:
Serializable
,Comparable<StreamCreator.LeaderLocator>
,java.lang.constant.Constable
- Enclosing interface:
StreamCreator
The leader locator strategy.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe leader will be the node hosting the minimum number of stream leaders, if there are overall less than 1000 queues, or a random node, if there are overall more than 1000 queues.The stream leader will be on the node the client is connected to.The stream leader will be on the node with the least number of stream leaders.The stream leader will be a random node of the cluster. -
Method Summary
Modifier and TypeMethodDescriptionstatic StreamCreator.LeaderLocator
value()
static StreamCreator.LeaderLocator
Returns the enum constant of this type with the specified name.static StreamCreator.LeaderLocator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CLIENT_LOCAL
The stream leader will be on the node the client is connected to.This is the default value.
-
BALANCED
The leader will be the node hosting the minimum number of stream leaders, if there are overall less than 1000 queues, or a random node, if there are overall more than 1000 queues.Available as of RabbitMQ 3.10.
Default value for RabbitMQ 3.10+.
-
RANDOM
The stream leader will be a random node of the cluster.Deprecated as of RabbitMQ 3.10, same as
BALANCED
. -
LEAST_LEADERS
The stream leader will be on the node with the least number of stream leaders.Deprecated as of RabbitMQ 3.10, same as
BALANCED
.Default value for RabbitMQ 3.9.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
from
-
value
-