Module org.elasticsearch.server
Class DataStreamGlobalRetentionSettings
java.lang.Object
org.elasticsearch.cluster.metadata.DataStreamGlobalRetentionSettings
This class holds the data stream global retention settings. It defines, validates and monitors the settings.
The global retention settings apply to non-system data streams that are managed by the data stream lifecycle. They consist of: - The default retention which applies to the backing indices of data streams that do not have a retention defined. - The max retention which applies to backing and failure indices of data streams that do not have retention or their retention has exceeded this value. - The failures default retention which applied to the failure indices of data streams that do not have retention defined.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreate(ClusterSettings clusterSettings) Creates an instance and initialises the cluster settings listenersget()get(boolean failureStore) Returns the global retention that applies to the data or failures of a data streamgetDefaultRetention(boolean failureStore)
-
Field Details
-
MIN_RETENTION_VALUE
-
DATA_STREAMS_DEFAULT_RETENTION_SETTING
-
DATA_STREAMS_MAX_RETENTION_SETTING
-
FAILURE_STORE_DEFAULT_RETENTION_SETTING
-
-
Method Details
-
getMaxRetention
- Returns:
- the max retention that applies to all data stream data
-
getDefaultRetention
- Returns:
- the default retention that applies either to the data component
-
getDefaultRetention
- Returns:
- the default retention that applies either to the data or the failures component
-
create
Creates an instance and initialises the cluster settings listeners- Parameters:
clusterSettings- it will register the cluster settings listeners to monitor for changes
-
get
- Returns:
- the global retention of backing indices
-
get
Returns the global retention that applies to the data or failures of a data stream- Parameters:
failureStore- , true if we are retrieving the global retention that applies to failure store, false otherwise.
-