Class FlushRequest
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportRequest
-
- org.elasticsearch.action.ActionRequest
-
- org.elasticsearch.action.support.broadcast.BroadcastRequest<FlushRequest>
-
- org.elasticsearch.action.admin.indices.flush.FlushRequest
-
- All Implemented Interfaces:
IndicesRequest,IndicesRequest.Replaceable,Streamable,Writeable,TaskAwareRequest
public class FlushRequest extends BroadcastRequest<FlushRequest>
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...).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.support.broadcast.BroadcastRequest
indices
-
-
Constructor Summary
Constructors Constructor Description FlushRequest(java.lang.String... indices)Constructs a new flush request against one or more indices.FlushRequest(StreamInput in)
-
Method Summary
Modifier and Type Method Description booleanforce()Force flushing, even if one is possibly not needed.FlushRequestforce(boolean force)Force flushing, even if one is possibly not needed.voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.java.lang.StringtoString()ActionRequestValidationExceptionvalidate()booleanwaitIfOngoing()Returnstrueiff a flush should block if a another flush operation is already running.FlushRequestwaitIfOngoing(boolean waitIfOngoing)if set totruethe flush will block if a another flush operation is already running until the flush can be performed.voidwriteTo(StreamOutput out)Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastRequest
indices, indices, indicesOptions, indicesOptions
-
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
-
-
-
Constructor Detail
-
FlushRequest
public FlushRequest(java.lang.String... indices)
Constructs a new flush request against one or more indices. If nothing is provided, all indices will be flushed.
-
FlushRequest
public FlushRequest(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
waitIfOngoing
public boolean waitIfOngoing()
Returnstrueiff a flush should block if a another flush operation is already running. Otherwisefalse
-
waitIfOngoing
public FlushRequest waitIfOngoing(boolean waitIfOngoing)
if set totruethe flush will block if a another flush operation is already running until the flush can be performed. The default istrue
-
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.
-
validate
public ActionRequestValidationException validate()
- Overrides:
validatein classBroadcastRequest<FlushRequest>
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBroadcastRequest<FlushRequest>- Throws:
java.io.IOException
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classBroadcastRequest<FlushRequest>- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-