IndicesRequest
, AckedRequest
, Streamable
, Writeable
, ToXContent
, ToXContentObject
, TaskAwareRequest
public class RolloverRequest extends AcknowledgedRequest<RolloverRequest> implements IndicesRequest, ToXContentObject
IndicesRequest.Replaceable
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
TransportRequest.Empty
Writeable.Reader<V>, Writeable.Writer<V>
DEFAULT_ACK_TIMEOUT, timeout
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
EMPTY_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.
|
masterNodeTimeout
ackTimeout, timeout, timeout, timeout
getShouldStoreResult
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createTask, getDescription, setParentTask
isFragment
remoteAddress, remoteAddress
getParentTask, setParentTask
public RolloverRequest(java.lang.String alias, java.lang.String newIndexName)
public ActionRequestValidationException validate()
validate
in class ActionRequest
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class AcknowledgedRequest<RolloverRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in interface Writeable
writeTo
in class AcknowledgedRequest<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 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 ToXContent
java.io.IOException
public void fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException