public enum BatchMode extends Enum<BatchMode>
| Enum Constant and Description |
|---|
PARTITION_KEY
Groups together statements that share the same partition key.
|
REPLICA_SET
Groups together statements that share the same replica set.
|
| Modifier and Type | Method and Description |
|---|---|
static BatchMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BatchMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BatchMode PARTITION_KEY
Under the hood, this mode uses either the statement's routing key or routing token, whichever is available, starting with the routing token.
public static final BatchMode REPLICA_SET
PARTITION_KEY for larger clusters or high replication factors (i.e. RF
> 3).
Note that this mode can only work if the statements to batch have their routing keyspace set. If this condition is not met, the batcher will
silently fall back to PARTITION_KEY mode.
public static BatchMode[] values()
for (BatchMode c : BatchMode.values()) System.out.println(c);
public static BatchMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2017–2021 DataStax. All rights reserved.