IndicesRequest, AckedRequest, Streamable, Writeable, TaskAwareRequestpublic class RolloverRequest extends AcknowledgedRequest<RolloverRequest> implements IndicesRequest
IndicesRequest.ReplaceableTransportRequest.EmptyWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static ObjectParser<RolloverRequest,java.lang.Void> |
PARSER |
DEFAULT_ACK_TIMEOUT, timeoutDEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout| Constructor | Description |
|---|---|
RolloverRequest(java.lang.String alias,
java.lang.String newIndexName) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addMaxIndexAgeCondition(TimeValue age) |
Adds condition to check if the index is at least
age old |
void |
addMaxIndexDocsCondition(long numDocs) |
Adds condition to check if the index has at least
numDocs |
void |
addMaxIndexSizeCondition(ByteSizeValue size) |
Adds a size-based condition to check if the index size is at least
size. |
void |
dryRun(boolean dryRun) |
Sets if the rollover should not be executed when conditions are met
|
java.lang.String[] |
indices() |
Returns the array of indices that the action relates to
|
IndicesOptions |
indicesOptions() |
Returns the indices options used to resolve indices.
|
void |
readFrom(StreamInput in) |
Set this object's fields from a StreamInput.
|
void |
setAlias(java.lang.String alias) |
Sets the alias to rollover to another index
|
void |
setCreateIndexRequest(CreateIndexRequest createIndexRequest) |
Sets rollover index creation request to override index settings when
the rolled over index has to be created
|
void |
setNewIndexName(java.lang.String newIndexName) |
Sets the alias to rollover to another index
|
void |
setWaitForActiveShards(int waitForActiveShards) |
A shortcut for
setWaitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount. |
void |
setWaitForActiveShards(ActiveShardCount waitForActiveShards) |
Sets the number of shard copies that should be active for creation of the
new rollover index to return.
|
ActionRequestValidationException |
validate() |
|
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 static final ObjectParser<RolloverRequest,java.lang.Void> PARSER
public RolloverRequest(java.lang.String alias,
java.lang.String newIndexName)
public ActionRequestValidationException validate()
validate in class ActionRequestpublic void readFrom(StreamInput in) throws java.io.IOException
StreamablereadFrom in interface StreamablereadFrom in class AcknowledgedRequest<RolloverRequest>java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
StreamablewriteTo in interface StreamablewriteTo in interface WriteablewriteTo in class AcknowledgedRequest<RolloverRequest>java.io.IOExceptionpublic java.lang.String[] indices()
IndicesRequestindices in interface IndicesRequestpublic IndicesOptions indicesOptions()
IndicesRequestindicesOptions in interface IndicesRequestpublic void setAlias(java.lang.String alias)
public void setNewIndexName(java.lang.String newIndexName)
public void dryRun(boolean dryRun)
public void addMaxIndexAgeCondition(TimeValue age)
age oldpublic void addMaxIndexDocsCondition(long numDocs)
numDocspublic void addMaxIndexSizeCondition(ByteSizeValue size)
size.public void setCreateIndexRequest(CreateIndexRequest createIndexRequest)
public void setWaitForActiveShards(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.
Index creation will only wait up until the timeout value for the number of shard copies
to be active before returning. Check RolloverResponse.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 void setWaitForActiveShards(int waitForActiveShards)
setWaitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount.