Class Manifest
java.lang.Object
org.elasticsearch.cluster.metadata.Manifest
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment
public class Manifest
extends java.lang.Object
implements org.elasticsearch.common.xcontent.ToXContentFragment
This class represents the manifest file, which is the entry point for reading meta data from disk.
Metadata consists of global metadata and index metadata.
When new version of metadata is written it's assigned some generation long value.
Global metadata generation could be obtained by calling
getGlobalGeneration().
Index metadata generation could be obtained by calling getIndexGenerations().-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static MetadataStateFormat<Manifest>FORMAT -
Constructor Summary
-
Method Summary
Modifier and Type Method Description static Manifestempty()booleanequals(java.lang.Object o)static ManifestfromXContent(org.elasticsearch.common.xcontent.XContentParser parser)longgetClusterStateVersion()longgetCurrentTerm()longgetGlobalGeneration()Returns global metadata generation.java.util.Map<Index,java.lang.Long>getIndexGenerations()Returns map fromIndexto index metadata generation.inthashCode()booleanisEmpty()booleanisGlobalGenerationMissing()java.lang.StringtoString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)static ManifestunknownCurrentTermAndVersion(long globalGeneration, java.util.Map<Index,java.lang.Long> indexGenerations)
-
Field Details
-
Constructor Details
-
Method Details
-
unknownCurrentTermAndVersion
-
getGlobalGeneration
public long getGlobalGeneration()Returns global metadata generation. -
getIndexGenerations
Returns map fromIndexto index metadata generation. -
getCurrentTerm
public long getCurrentTerm() -
getClusterStateVersion
public long getClusterStateVersion() -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-
fromXContent
public static Manifest fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
isEmpty
public boolean isEmpty() -
empty
-
isGlobalGenerationMissing
public boolean isGlobalGenerationMissing()
-