public class RolloverRequest extends AcknowledgedRequest<RolloverRequest> implements IndicesRequest
TransportRequest.Empty
IndicesRequest.Replaceable
Modifier and Type | Field and Description |
---|---|
static ObjectParser<RolloverRequest,ParseFieldMatcherSupplier> |
PARSER |
DEFAULT_ACK_TIMEOUT, timeout
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
Constructor and Description |
---|
RolloverRequest(java.lang.String alias,
java.lang.String newIndexName) |
Modifier and Type | Method and 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 |
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 |
source(BytesReference source) |
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
ackTimeout, readTimeout, timeout, timeout, timeout, writeTimeout
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
getShouldPersistResult
createTask, getDescription, getParentTask, setParentTask, setParentTask
remoteAddress, remoteAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
masterNodeTimeout
public static ObjectParser<RolloverRequest,ParseFieldMatcherSupplier> PARSER
public RolloverRequest(java.lang.String alias, java.lang.String newIndexName)
public ActionRequestValidationException validate()
validate
in class ActionRequest<RolloverRequest>
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class MasterNodeRequest<RolloverRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class MasterNodeRequest<RolloverRequest>
java.io.IOException
public java.lang.String[] indices()
IndicesRequest
indices
in interface IndicesRequest
public IndicesOptions indicesOptions()
IndicesRequest
indicesOptions
in interface IndicesRequest
public 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)
numDocs
public void setCreateIndexRequest(CreateIndexRequest createIndexRequest)
public void source(BytesReference source)