Class Retention
java.lang.Object
co.elastic.clients.elasticsearch.slm.Retention
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class Retention extends java.lang.Object implements JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Retention.Builder
Builder forRetention
. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Retention>
_DESERIALIZER
Json deserializer forRetention
-
Method Summary
Modifier and Type Method Description Time
expireAfter()
Required - Time period after which a snapshot is considered expired and eligible for deletion.int
maxCount()
Required - Maximum number of snapshots to retain, even if the snapshots have not yet expired.int
minCount()
Required - Minimum number of snapshots to retain, even if the snapshots have expired.static Retention
of(java.util.function.Function<Retention.Builder,ObjectBuilder<Retention>> fn)
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this object to JSON.protected void
serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupRetentionDeserializer(ObjectDeserializer<Retention.Builder> op)
java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forRetention
-
-
Method Details
-
of
public static Retention of(java.util.function.Function<Retention.Builder,ObjectBuilder<Retention>> fn) -
expireAfter
Required - 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 final int maxCount()Required - 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 final int minCount()Required - Minimum number of snapshots to retain, even if the snapshots have expired.API name:
min_count
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
setupRetentionDeserializer
-