Package org.apache.cassandra.locator
Enum ReplicaCollection.Builder.Conflict
- java.lang.Object
-
- java.lang.Enum<ReplicaCollection.Builder.Conflict>
-
- org.apache.cassandra.locator.ReplicaCollection.Builder.Conflict
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ReplicaCollection.Builder.Conflict>
- Enclosing interface:
- ReplicaCollection.Builder<C extends ReplicaCollection<C>>
public static enum ReplicaCollection.Builder.Conflict extends java.lang.Enum<ReplicaCollection.Builder.Conflict>
Passed to add() and addAll() as ignoreConflicts parameter. The meaning of conflict varies by collection type (for Endpoints, it is a duplicate InetAddressAndPort; for RangesAtEndpoint it is a duplicate Range).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReplicaCollection.Builder.Conflict
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ReplicaCollection.Builder.Conflict[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ReplicaCollection.Builder.Conflict NONE
fail on addition of any such conflict
-
DUPLICATE
public static final ReplicaCollection.Builder.Conflict DUPLICATE
fail on addition of any such conflict where the contents differ (first occurrence and position wins)
-
ALL
public static final ReplicaCollection.Builder.Conflict ALL
ignore all conflicts (the first occurrence and position wins)
-
-
Method Detail
-
values
public static ReplicaCollection.Builder.Conflict[] 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 (ReplicaCollection.Builder.Conflict c : ReplicaCollection.Builder.Conflict.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReplicaCollection.Builder.Conflict 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 namejava.lang.NullPointerException
- if the argument is null
-
-