Package com.rabbitmq.stream
Enum StreamCreator.LeaderLocator
- java.lang.Object
-
- java.lang.Enum<StreamCreator.LeaderLocator>
-
- com.rabbitmq.stream.StreamCreator.LeaderLocator
-
- All Implemented Interfaces:
Serializable
,Comparable<StreamCreator.LeaderLocator>
- Enclosing interface:
- StreamCreator
public static enum StreamCreator.LeaderLocator extends Enum<StreamCreator.LeaderLocator>
The leader locator strategy.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description 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.CLIENT_LOCAL
The stream leader will be on the node the client is connected to.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StreamCreator.LeaderLocator
from(String value)
String
value()
static StreamCreator.LeaderLocator
valueOf(String name)
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 Detail
-
CLIENT_LOCAL
public static final StreamCreator.LeaderLocator CLIENT_LOCAL
The stream leader will be on the node the client is connected to.This is the default value.
-
BALANCED
public static final StreamCreator.LeaderLocator 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+.
-
-
Method Detail
-
values
public static StreamCreator.LeaderLocator[] 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 (StreamCreator.LeaderLocator c : StreamCreator.LeaderLocator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StreamCreator.LeaderLocator valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
from
public static StreamCreator.LeaderLocator from(String value)
-
value
public String value()
-
-