Module org.elasticsearch.server
Class MetadataDataStreamsService
java.lang.Object
org.elasticsearch.cluster.metadata.MetadataDataStreamsService
Handles data stream modification requests.
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataDataStreamsService
(ClusterService clusterService, IndicesService indicesService, DataStreamGlobalRetentionSettings globalRetentionSettings) -
Method Summary
Modifier and TypeMethodDescriptionvoid
modifyDataStream
(ModifyDataStreamsAction.Request request, ActionListener<AcknowledgedResponse> listener) void
removeDataStreamOptions
(List<String> dataStreamNames, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to remove the data stream options from the requested data streams.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
setDataStreamOptions
(List<String> dataStreamNames, DataStreamOptions options, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to set the provided data stream options to 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, boolean targetFailureStore, 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, boolean targetFailureStore) 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
public MetadataDataStreamsService(ClusterService clusterService, IndicesService indicesService, DataStreamGlobalRetentionSettings globalRetentionSettings)
-
-
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. -
setDataStreamOptions
public void setDataStreamOptions(List<String> dataStreamNames, DataStreamOptions options, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to set the provided data stream options to the requested data streams. -
removeDataStreamOptions
public void removeDataStreamOptions(List<String> dataStreamNames, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to remove the data stream options from the requested data streams. -
setRolloverOnWrite
public void setRolloverOnWrite(String dataStreamName, boolean rolloverOnWrite, boolean targetFailureStore, 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, boolean targetFailureStore) 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 flagtargetFailureStore
- whether this rollover targets the failure store or the backing indices- Returns:
- the updated cluster state
-