类 CloseIndexRequest
java.lang.Object
org.easysearch.client.TimedRequest
org.easysearch.client.indices.CloseIndexRequest
- 所有已实现的接口:
Validatable
public class CloseIndexRequest extends TimedRequest implements Validatable
A request to close an index.
-
字段概要
从类继承的字段 org.easysearch.client.TimedRequest
DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUT从接口继承的字段 org.easysearch.client.Validatable
EMPTY -
构造器概要
构造器 构造器 说明 CloseIndexRequest(java.lang.String... indices)Creates a new close index request -
方法概要
修饰符和类型 方法 说明 java.lang.String[]indices()Returns the indices to closeorg.easysearch.action.support.IndicesOptionsindicesOptions()Specifies what type of requested indices to ignore and how to deal with wildcard expressions.CloseIndexRequestindicesOptions(org.easysearch.action.support.IndicesOptions indicesOptions)Specifies what type of requested indices to ignore and how to deal with wildcard expressions.java.util.Optional<ValidationException>validate()Perform validation.org.easysearch.action.support.ActiveShardCountwaitForActiveShards()Returns the wait for active shard count or null if the default should be usedCloseIndexRequestwaitForActiveShards(org.easysearch.action.support.ActiveShardCount waitForActiveShards)Sets the number of shard copies that should be active for indices opening to return.从类继承的方法 org.easysearch.client.TimedRequest
masterNodeTimeout, setMasterTimeout, setTimeout, timeout从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
构造器详细资料
-
CloseIndexRequest
public CloseIndexRequest(java.lang.String... indices)Creates a new close index request- 参数:
indices- the indices to close
-
-
方法详细资料
-
indices
public java.lang.String[] indices()Returns the indices to close -
indicesOptions
public org.easysearch.action.support.IndicesOptions indicesOptions()Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.- 返回:
- the current behaviour when it comes to index names and wildcard indices expressions
-
indicesOptions
public CloseIndexRequest indicesOptions(org.easysearch.action.support.IndicesOptions indicesOptions)Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.- 参数:
indicesOptions- the desired behaviour regarding indices to ignore and wildcard indices expressions
-
waitForActiveShards
public org.easysearch.action.support.ActiveShardCount waitForActiveShards()Returns the wait for active shard count or null if the default should be used -
waitForActiveShards
public CloseIndexRequest waitForActiveShards(org.easysearch.action.support.ActiveShardCount 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.- 参数:
waitForActiveShards- number of active shard copies to wait on
-
validate
从接口复制的说明:ValidatablePerform validation. This method does not have to be overridden in the event that no validation needs to be done, or the validation was done during object construction time. AValidationExceptionthat is not null is assumed to contain validation errors and will be thrown.- 指定者:
validate在接口中Validatable- 返回:
- An
OptionalValidationExceptionthat contains a list of validation errors.
-