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,ToXContent,ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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, TimeValue expireAfter, Integer minimumSnapshotCount, Integer maximumSnapshotCount) SnapshotRetentionConfiguration(TimeValue expireAfter, Integer minimumSnapshotCount, Integer maximumSnapshotCount) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanisSnapshotEligibleForDeletion(SnapshotId snapshotId, RepositoryData.SnapshotDetails snapshotDetails, Map<SnapshotId, RepositoryData.SnapshotDetails> allSnapshots) parse(XContentParser parser, String name) toString()toXContent(XContentBuilder builder, 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
-
-
Method Details
-
parse
-
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 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-