Module org.elasticsearch.server
Class MetadataDataStreamsService
java.lang.Object
org.elasticsearch.cluster.metadata.MetadataDataStreamsService
Handles data stream modification requests.
-
Constructor Summary
ConstructorDescriptionMetadataDataStreamsService
(ClusterService clusterService, IndicesService indicesService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
modifyDataStream
(ModifyDataStreamsAction.Request request, ActionListener<AcknowledgedResponse> listener) void
removeLifecycle
(List<String> dataStreamNames, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to remove the lifecycle from the requested data streams.void
setLifecycle
(List<String> dataStreamNames, DataStreamLifecycle lifecycle, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to set the lifecycle to the requested data streams.void
setRolloverOnWrite
(String dataStreamName, boolean rolloverOnWrite, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to signal that the next time this data stream receives a document, it will be rolled over.static ClusterState
setRolloverOnWrite
(ClusterState currentState, String dataStreamName, boolean rolloverOnWrite) Creates an updated cluster state in which the requested data stream has the flagDataStream.rolloverOnWrite()
set to the value of the parameter rolloverOnWrite
-
Constructor Details
-
MetadataDataStreamsService
-
-
Method Details
-
modifyDataStream
public void modifyDataStream(ModifyDataStreamsAction.Request request, ActionListener<AcknowledgedResponse> listener) -
setLifecycle
public void setLifecycle(List<String> dataStreamNames, DataStreamLifecycle lifecycle, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to set the lifecycle to the requested data streams. -
removeLifecycle
public void removeLifecycle(List<String> dataStreamNames, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to remove the lifecycle from the requested data streams. -
setRolloverOnWrite
public void setRolloverOnWrite(String dataStreamName, boolean rolloverOnWrite, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to signal that the next time this data stream receives a document, it will be rolled over. -
setRolloverOnWrite
public static ClusterState setRolloverOnWrite(ClusterState currentState, String dataStreamName, boolean rolloverOnWrite) Creates an updated cluster state in which the requested data stream has the flagDataStream.rolloverOnWrite()
set to the value of the parameter rolloverOnWrite- Parameters:
currentState
- the initial cluster statedataStreamName
- the name of the data stream to be updatedrolloverOnWrite
- the value of the flag- Returns:
- the updated cluster state
-