IndicesRequest, AckedRequest, Streamable, Writeable, ToXContent, ToXContentObject, TaskAwareRequestpublic class RolloverRequest extends AcknowledgedRequest<RolloverRequest> implements IndicesRequest, ToXContentObject
IndicesRequest.ReplaceableToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsTransportRequest.EmptyWriteable.Reader<V>, Writeable.Writer<V>DEFAULT_ACK_TIMEOUT, timeoutDEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeoutEMPTY_PARAMS| 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
|
void |
fromXContent(XContentParser parser) |
|
java.lang.String |
getAlias() |
|
CreateIndexRequest |
getCreateIndexRequest() |
Returns the inner
CreateIndexRequest. |
java.lang.String |
getNewIndexName() |
|
java.lang.String[] |
indices() |
Returns the array of indices that the action relates to
|
IndicesOptions |
indicesOptions() |
Returns the indices options used to resolve indices.
|
boolean |
isDryRun() |
|
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 |
setNewIndexName(java.lang.String newIndexName) |
Sets the alias to rollover to another index
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
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, waitcreateTask, getDescription, setParentTaskisFragmentremoteAddress, remoteAddressgetParentTask, setParentTaskpublic 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 boolean isDryRun()
public java.lang.String getAlias()
public java.lang.String getNewIndexName()
public CreateIndexRequest getCreateIndexRequest()
CreateIndexRequest. Allows to configure mappings, settings and aliases for the new index.public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionpublic void fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException