org.elasticsearch.action.support.replication
Class ShardReplicationOperationRequest

java.lang.Object
  extended by org.elasticsearch.action.support.replication.ShardReplicationOperationRequest
All Implemented Interfaces:
ActionRequest, Streamable
Direct Known Subclasses:
BulkShardRequest, DeleteRequest, IndexRequest, ShardDeleteByQueryRequest, ShardDeleteRequest

public abstract class ShardReplicationOperationRequest
extends Object
implements ActionRequest


Field Summary
static TimeValue DEFAULT_TIMEOUT
           
protected  String index
           
protected  TimeValue timeout
           
 
Constructor Summary
ShardReplicationOperationRequest()
           
 
Method Summary
 void beforeLocalFork()
          Called before the request gets forked into a local thread.
 WriteConsistencyLevel consistencyLevel()
           
 ShardReplicationOperationRequest consistencyLevel(WriteConsistencyLevel consistencyLevel)
           
 String index()
           
 ShardReplicationOperationRequest index(String index)
           
 boolean listenerThreaded()
          Should the listener be called on a separate thread if needed.
 ShardReplicationOperationRequest listenerThreaded(boolean threadedListener)
          Should the listener be called on a separate thread if needed.
 boolean operationThreaded()
          Controls if the operation will be executed on a separate thread when executed locally.
 ShardReplicationOperationRequest operationThreaded(boolean threadedOperation)
          Controls if the operation will be executed on a separate thread when executed locally.
 void readFrom(StreamInput in)
           
 ReplicationType replicationType()
          The replication type.
 ShardReplicationOperationRequest replicationType(ReplicationType replicationType)
          Sets the replication type.
 TimeValue timeout()
           
 ActionRequestValidationException validate()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

public static final TimeValue DEFAULT_TIMEOUT

timeout

protected TimeValue timeout

index

protected String index
Constructor Detail

ShardReplicationOperationRequest

public ShardReplicationOperationRequest()
Method Detail

timeout

public TimeValue timeout()

index

public String index()

index

public ShardReplicationOperationRequest index(String index)

listenerThreaded

public boolean listenerThreaded()
Should the listener be called on a separate thread if needed.

Specified by:
listenerThreaded in interface ActionRequest

listenerThreaded

public ShardReplicationOperationRequest listenerThreaded(boolean threadedListener)
Should the listener be called on a separate thread if needed.

Specified by:
listenerThreaded in interface ActionRequest

operationThreaded

public boolean operationThreaded()
Controls if the operation will be executed on a separate thread when executed locally.


operationThreaded

public ShardReplicationOperationRequest operationThreaded(boolean threadedOperation)
Controls if the operation will be executed on a separate thread when executed locally. Defaults to true when running in embedded mode.


replicationType

public ReplicationType replicationType()
The replication type.


replicationType

public ShardReplicationOperationRequest replicationType(ReplicationType replicationType)
Sets the replication type.


consistencyLevel

public WriteConsistencyLevel consistencyLevel()

consistencyLevel

public ShardReplicationOperationRequest consistencyLevel(WriteConsistencyLevel consistencyLevel)

validate

public ActionRequestValidationException validate()
Specified by:
validate in interface ActionRequest

readFrom

public void readFrom(StreamInput in)
              throws IOException
Specified by:
readFrom in interface Streamable
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Specified by:
writeTo in interface Streamable
Throws:
IOException

beforeLocalFork

public void beforeLocalFork()
Called before the request gets forked into a local thread.



Copyright © 2009-2012. All Rights Reserved.