org.elasticsearch.action.admin.indices.flush
Class FlushRequest

java.lang.Object
  extended by org.elasticsearch.action.support.broadcast.BroadcastOperationRequest
      extended by org.elasticsearch.action.admin.indices.flush.FlushRequest
All Implemented Interfaces:
ActionRequest, Streamable

public class FlushRequest
extends BroadcastOperationRequest

A flush request to flush one or more indices. The flush process of an index basically frees memory from the index by flushing data to the index storage and clearing the internal transaction log. By default, ElasticSearch uses memory heuristics in order to automatically trigger flush operations as required in order to clear memory.

Best created with Requests.flushRequest(String...).

See Also:
Requests.flushRequest(String...), IndicesAdminClient.flush(FlushRequest), FlushResponse

Field Summary
 
Fields inherited from class org.elasticsearch.action.support.broadcast.BroadcastOperationRequest
indices
 
Constructor Summary
FlushRequest(String... indices)
          Constructs a new flush request against one or more indices.
 
Method Summary
 boolean force()
          Force flushing, even if one is possibly not needed.
 FlushRequest force(boolean force)
          Force flushing, even if one is possibly not needed.
 boolean full()
          Should a "full" flush be performed.
 FlushRequest full(boolean full)
          Should a "full" flush be performed.
 FlushRequest listenerThreaded(boolean threadedListener)
          Should the listener be called on a separate thread if needed.
 FlushRequest operationThreading(BroadcastOperationThreading operationThreading)
          Controls the operation threading model.
 void readFrom(StreamInput in)
           
 boolean refresh()
          Should a refresh be performed once the flush is done.
 FlushRequest refresh(boolean refresh)
          Should a refresh be performed once the flush is done.
 void writeTo(StreamOutput out)
           
 
Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastOperationRequest
beforeLocalFork, beforeStart, ignoreIndices, ignoreIndices, indices, indices, listenerThreaded, operationThreading, operationThreading, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlushRequest

public FlushRequest(String... indices)
Constructs a new flush request against one or more indices. If nothing is provided, all indices will be flushed.

Method Detail

refresh

public boolean refresh()
Should a refresh be performed once the flush is done. Defaults to false.


refresh

public FlushRequest refresh(boolean refresh)
Should a refresh be performed once the flush is done. Defaults to false.


full

public boolean full()
Should a "full" flush be performed.


full

public FlushRequest full(boolean full)
Should a "full" flush be performed.


force

public boolean force()
Force flushing, even if one is possibly not needed.


force

public FlushRequest force(boolean force)
Force flushing, even if one is possibly not needed.


listenerThreaded

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

Specified by:
listenerThreaded in interface ActionRequest
Overrides:
listenerThreaded in class BroadcastOperationRequest

operationThreading

public FlushRequest operationThreading(BroadcastOperationThreading operationThreading)
Controls the operation threading model.

Overrides:
operationThreading in class BroadcastOperationRequest

writeTo

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

readFrom

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


Copyright © 2009-2012. All Rights Reserved.