IndicesRequest, IndicesRequest.Replaceable, AckedRequest, Streamable, Writeable, TaskAwareRequestpublic class OpenIndexRequest extends AcknowledgedRequest<OpenIndexRequest> implements IndicesRequest.Replaceable
IndicesRequest.ReplaceableTransportRequest.EmptyWriteable.Reader<V>, Writeable.Writer<V>DEFAULT_ACK_TIMEOUT, timeoutDEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout| Constructor | Description |
|---|---|
OpenIndexRequest() |
|
OpenIndexRequest(java.lang.String... indices) |
Constructs a new open index request for the specified index.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String[] |
indices() |
The indices to be opened
|
OpenIndexRequest |
indices(java.lang.String... indices) |
Sets the indices to be opened
|
IndicesOptions |
indicesOptions() |
Specifies what type of requested indices to ignore and how to deal with wildcard expressions.
|
OpenIndexRequest |
indicesOptions(IndicesOptions indicesOptions) |
Specifies what type of requested indices to ignore and how to deal with wildcard expressions.
|
void |
readFrom(StreamInput in) |
Set this object's fields from a StreamInput.
|
ActionRequestValidationException |
validate() |
|
ActiveShardCount |
waitForActiveShards() |
|
OpenIndexRequest |
waitForActiveShards(int waitForActiveShards) |
A shortcut for
waitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount. |
OpenIndexRequest |
waitForActiveShards(ActiveShardCount waitForActiveShards) |
Sets the number of shard copies that should be active for indices opening to return.
|
void |
writeTo(StreamOutput out) |
Write this object's fields to a StreamOutput.
|
masterNodeTimeoutackTimeout, timeout, timeout, timeoutgetShouldStoreResultmasterNodeTimeout, masterNodeTimeout, masterNodeTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewWriteableReadercreateTask, getDescription, setParentTaskremoteAddress, remoteAddressgetParentTask, setParentTaskpublic OpenIndexRequest()
public OpenIndexRequest(java.lang.String... indices)
public ActionRequestValidationException validate()
validate in class ActionRequestpublic java.lang.String[] indices()
indices in interface IndicesRequestpublic OpenIndexRequest indices(java.lang.String... indices)
indices in interface IndicesRequest.Replaceableindices - the indices to be openedpublic IndicesOptions indicesOptions()
indicesOptions in interface IndicesRequestpublic OpenIndexRequest indicesOptions(IndicesOptions indicesOptions)
indicesOptions - the desired behaviour regarding indices to ignore and wildcard indices expressionspublic ActiveShardCount waitForActiveShards()
public OpenIndexRequest waitForActiveShards(ActiveShardCount waitForActiveShards)
ActiveShardCount.DEFAULT, which will wait for one shard copy
(the primary) to become active. Set this value to ActiveShardCount.ALL to
wait for all shards (primary and all replicas) to be active before returning.
Otherwise, use ActiveShardCount.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. Check OpenIndexResponse.isShardsAcknowledged() to
determine if the requisite shard copies were all started before returning or timing out.waitForActiveShards - number of active shard copies to wait onpublic OpenIndexRequest waitForActiveShards(int waitForActiveShards)
waitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount.public void readFrom(StreamInput in) throws java.io.IOException
StreamablereadFrom in interface StreamablereadFrom in class AcknowledgedRequest<OpenIndexRequest>java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
StreamablewriteTo in interface StreamablewriteTo in interface WriteablewriteTo in class AcknowledgedRequest<OpenIndexRequest>java.io.IOException