public enum Replication extends Enum<Replication>
Enum Constant and Description |
---|
DEFAULT
Default replication is used.
|
FULL
Data is fully replicated: Data plus its copies are located in all the
cluster
|
NONE
Data is no replicated
|
ONE
One copy of the data is kept
|
QUORUM
The data plus its copies form a quorum
|
Modifier and Type | Method and Description |
---|---|
abstract int |
getFactor(int clusterSize)
Gets a numeric replication factor for the given
clusterSize |
static Replication |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Replication[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Replication DEFAULT
getFactor(int)
makes no sense for
this constant, a default should be defined by the implementation and
such default should be used,public static final Replication NONE
public static final Replication ONE
public static final Replication QUORUM
public static final Replication FULL
public static Replication[] values()
for (Replication c : Replication.values()) System.out.println(c);
public static Replication 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 nullpublic abstract int getFactor(int clusterSize)
clusterSize
clusterSize
- size of the clusterCopyright © 2016. All Rights Reserved.