Module org.elasticsearch.xcore
Package org.elasticsearch.xpack.core.slm
Class SnapshotLifecyclePolicyMetadata
java.lang.Object
org.elasticsearch.xpack.core.slm.SnapshotLifecyclePolicyMetadata
- All Implemented Interfaces:
Diffable<SnapshotLifecyclePolicyMetadata>,SimpleDiffable<SnapshotLifecyclePolicyMetadata>,Writeable,ToXContent,ToXContentObject
public class SnapshotLifecyclePolicyMetadata
extends Object
implements SimpleDiffable<SnapshotLifecyclePolicyMetadata>, ToXContentObject
SnapshotLifecyclePolicyMetadata encapsulates a SnapshotLifecyclePolicy as well as
the additional meta information link headers used for execution, version (a monotonically
incrementing number), and last modified date-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>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
FieldsModifier and TypeFieldDescriptionstatic final ConstructingObjectParser<SnapshotLifecyclePolicyMetadata, String> Fields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotLifecyclePolicyMetadata(SnapshotLifecyclePolicy policy, Map<String, String> headers, long version, long modifiedDate, SnapshotInvocationRecord lastSuccess, SnapshotInvocationRecord lastFailure, long invocationsSinceLastSuccess) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder(SnapshotLifecyclePolicyMetadata metadata) buildSchedulerJob(String jobId) booleangetId()longlonglonginthashCode()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.cluster.SimpleDiffable
diffMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
PARSER
-
-
Constructor Details
-
SnapshotLifecyclePolicyMetadata
public SnapshotLifecyclePolicyMetadata(SnapshotLifecyclePolicy policy, Map<String, String> headers, long version, long modifiedDate, SnapshotInvocationRecord lastSuccess, SnapshotInvocationRecord lastFailure, long invocationsSinceLastSuccess)
-
-
Method Details
-
parse
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
builder
-
builder
public static SnapshotLifecyclePolicyMetadata.Builder builder(SnapshotLifecyclePolicyMetadata metadata) -
getHeaders
-
getPolicy
-
getId
-
getVersion
public long getVersion() -
getModifiedDate
public long getModifiedDate() -
getLastSuccess
-
getLastFailure
-
getInvocationsSinceLastSuccess
public long getInvocationsSinceLastSuccess() -
buildSchedulerJob
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-