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
  • Field Details

  • Method Details

    • of

      public static Retention of​(java.util.function.Function<Retention.Builder,​ObjectBuilder<Retention>> fn)
    • expireAfter

      public final Time 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

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupRetentionDeserializer

      protected static void setupRetentionDeserializer​(ObjectDeserializer<Retention.Builder> op)