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,Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest
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.EmptyNested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.ReplaceableNested 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
ConstructorsConstructorDescriptionFlushRequest(String... indices)Constructs a new flush request against one or more indices. -
Method Summary
Modifier and TypeMethodDescriptionbooleanforce()Force flushing, even if one is possibly not needed.force(boolean force)Force flushing, even if one is possibly not needed.toString()validate()booleanReturnstrueiff a flush should block if a another flush operation is already running.waitIfOngoing(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 into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastRequest
includeDataStreams, indices, indices, indicesOptions, indicesOptions, timeout, timeoutMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.action.IndicesRequest
allowsRemoteIndicesMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Constructor Details
-
FlushRequest
Constructs a new flush request against one or more indices. If nothing is provided, all indices will be flushed. -
FlushRequest
- Throws:
IOException
-
-
Method Details
-
waitIfOngoing
public boolean waitIfOngoing()Returnstrueiff a flush should block if a another flush operation is already running. Otherwisefalse -
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
Force flushing, even if one is possibly not needed. -
validate
- Overrides:
validatein classBroadcastRequest<FlushRequest>
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBroadcastRequest<FlushRequest>- Throws:
IOException
-
toString
- Overrides:
toStringin classTransportRequest
-