java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.master.MasterNodeRequest<FreezeRequest>
org.elasticsearch.action.support.master.AcknowledgedRequest<FreezeRequest>
org.elasticsearch.protocol.xpack.frozen.FreezeRequest
- All Implemented Interfaces:
IndicesRequest,IndicesRequest.Replaceable,Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest
public class FreezeRequest
extends AcknowledgedRequest<FreezeRequest>
implements IndicesRequest.Replaceable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
AcknowledgedRequest.PlainNested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.RemoteClusterShardRequest, IndicesRequest.Replaceable, IndicesRequest.SingleIndexNoWildcardsNested 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.master.AcknowledgedRequest
DEFAULT_ACK_TIMEOUTFields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
TRAPPY_IMPLICIT_DEFAULT_MASTER_NODE_TIMEOUTFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsConstructorDescriptionFreezeRequest(org.elasticsearch.core.TimeValue masterNodeTimeout, org.elasticsearch.core.TimeValue ackTimeout, String... indices) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfreeze()String[]indices()Specifies what type of requested indices to ignore and how to deal with wildcard expressions.indicesOptions(IndicesOptions indicesOptions) Specifies what type of requested indices to ignore and how to deal with wildcard expressions.setFreeze(boolean freeze) validate()waitForActiveShards(ActiveShardCount waitForActiveShards) Sets the number of shard copies that should be active for indices opening to return.voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
ackTimeout, ackTimeoutMethods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
infiniteMasterNodeTimeout, masterNodeTimeout, masterNodeTimeout, masterTermMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, 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
includeDataStreamsMethods inherited from interface org.elasticsearch.action.IndicesRequest.Replaceable
allowsRemoteIndicesMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Constructor Details
-
FreezeRequest
public FreezeRequest(org.elasticsearch.core.TimeValue masterNodeTimeout, org.elasticsearch.core.TimeValue ackTimeout, String... indices) -
FreezeRequest
- Throws:
IOException
-
-
Method Details
-
validate
- Overrides:
validatein classAcknowledgedRequest<FreezeRequest>
-
setFreeze
-
freeze
public boolean freeze() -
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classAcknowledgedRequest<FreezeRequest>- Throws:
IOException
-
indices
- Specified by:
indicesin interfaceIndicesRequest- Returns:
- the indices to be frozen or unfrozen
-
indicesOptions
Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.- Specified by:
indicesOptionsin interfaceIndicesRequest- Returns:
- the current behaviour when it comes to index names and wildcard indices expressions
-
indicesOptions
Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.- Parameters:
indicesOptions- the desired behaviour regarding indices to ignore and wildcard indices expressions- Returns:
- the request itself
-
indices
- Specified by:
indicesin interfaceIndicesRequest.Replaceable
-
waitForActiveShards
-
waitForActiveShards
Sets the number of shard copies that should be active for indices opening to return. Defaults toActiveShardCount.DEFAULT, which will wait for one shard copy (the primary) to become active. Set this value toActiveShardCount.ALLto wait for all shards (primary and all replicas) to be active before returning. Otherwise, useActiveShardCount.from(int)to set this value to any non-negative integer, up to the number of copies per shard (number of replicas + 1), to wait for the desired amount of shard copies to become active before returning. Indices opening will only wait up until the timeout value for the number of shard copies to be active before returning. CheckShardsAcknowledgedResponse.isShardsAcknowledged()to determine if the requisite shard copies were all started before returning or timing out.- Parameters:
waitForActiveShards- number of active shard copies to wait on
-