Module org.elasticsearch.xcore
Package org.elasticsearch.xpack.core.slm
Class SnapshotRetentionConfiguration
java.lang.Object
org.elasticsearch.xpack.core.slm.SnapshotRetentionConfiguration
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotRetentionConfiguration(LongSupplier nowSupplier, org.elasticsearch.core.TimeValue expireAfter, Integer minimumSnapshotCount, Integer maximumSnapshotCount) SnapshotRetentionConfiguration(org.elasticsearch.core.TimeValue expireAfter, Integer minimumSnapshotCount, Integer maximumSnapshotCount) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanisSnapshotEligibleForDeletion(SnapshotId snapshotId, RepositoryData.SnapshotDetails snapshotDetails, Map<SnapshotId, RepositoryData.SnapshotDetails> allSnapshots) toString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
EMPTY
-
-
Constructor Details
-
SnapshotRetentionConfiguration
-
SnapshotRetentionConfiguration
public SnapshotRetentionConfiguration(LongSupplier nowSupplier, @Nullable org.elasticsearch.core.TimeValue expireAfter, @Nullable Integer minimumSnapshotCount, @Nullable Integer maximumSnapshotCount)
-
-
Method Details
-
parse
public static SnapshotRetentionConfiguration parse(org.elasticsearch.xcontent.XContentParser parser, String name) -
isSnapshotEligibleForDeletion
public boolean isSnapshotEligibleForDeletion(SnapshotId snapshotId, RepositoryData.SnapshotDetails snapshotDetails, Map<SnapshotId, RepositoryData.SnapshotDetails> allSnapshots) - Parameters:
allSnapshots- all the snapshot details pertaining to this SLM policy and repository- Returns:
- whether a snapshot should be deleted according to this retention policy.
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-