org.elasticsearch.action.support.replication
Enum ReplicationType

java.lang.Object
  extended by java.lang.Enum<ReplicationType>
      extended by org.elasticsearch.action.support.replication.ReplicationType
All Implemented Interfaces:
Serializable, Comparable<ReplicationType>

public enum ReplicationType
extends Enum<ReplicationType>

The type of replication to perform.


Enum Constant Summary
ASYNC
          Async replication.
DEFAULT
          Use the default replication type configured for this node.
SYNC
          Sync replication, wait till all replicas have performed the operation.
 
Method Summary
static ReplicationType fromId(byte id)
          Constructs the operation type from its internal representation.
static ReplicationType fromString(String type)
          Parse the replication type from string.
 byte id()
          The internal representation of the operation type.
static ReplicationType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ReplicationType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SYNC

public static final ReplicationType SYNC
Sync replication, wait till all replicas have performed the operation.


ASYNC

public static final ReplicationType ASYNC
Async replication. Will send the request to replicas, but will not wait for it


DEFAULT

public static final ReplicationType DEFAULT
Use the default replication type configured for this node.

Method Detail

values

public static ReplicationType[] 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 (ReplicationType c : ReplicationType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ReplicationType 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 name
NullPointerException - if the argument is null

id

public byte id()
The internal representation of the operation type.


fromId

public static ReplicationType fromId(byte id)
Constructs the operation type from its internal representation.


fromString

public static ReplicationType fromString(String type)
Parse the replication type from string.



Copyright © 2009-2012. All Rights Reserved.