Class Retention
java.lang.Object
co.elastic.clients.elasticsearch.slm.Retention
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public final class Retention extends java.lang.Object implements JsonpSerializable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRetention.BuilderBuilder forRetention. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Retention>_DESERIALIZERJson deserializer forRetention -
Constructor Summary
Constructors Constructor Description Retention(Retention.Builder builder)Retention(java.util.function.Function<Retention.Builder,Retention.Builder> fn) -
Method Summary
Modifier and Type Method Description java.lang.StringexpireAfter()Time period after which a snapshot is considered expired and eligible for deletion.intmaxCount()Maximum number of snapshots to retain, even if the snapshots have not yet expired.intminCount()Minimum number of snapshots to retain, even if the snapshots have expired.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupRetentionDeserializer(DelegatingDeserializer<Retention.Builder> op)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forRetention
-
-
Constructor Details
-
Retention
-
Retention
-
-
Method Details
-
expireAfter
public java.lang.String expireAfter()Time period after which a snapshot is considered expired and eligible for deletion. SLM deletes expired snapshots based on the slm.retention_schedule.API name:
expire_after -
maxCount
public int maxCount()Maximum number of snapshots to retain, even if the snapshots have not yet expired. If the number of snapshots in the repository exceeds this limit, the policy retains the most recent snapshots and deletes older snapshots.API name:
max_count -
minCount
public int minCount()Minimum number of snapshots to retain, even if the snapshots have expired.API name:
min_count -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupRetentionDeserializer
-