Class Manifest
java.lang.Object
org.elasticsearch.cluster.metadata.Manifest
- All Implemented Interfaces:
ToXContent
,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
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Manifest
empty()
boolean
static Manifest
fromXContent
(XContentParser parser) long
long
long
Returns global metadata generation.Returns map fromIndex
to index metadata generation.int
hashCode()
boolean
isEmpty()
boolean
toString()
toXContent
(XContentBuilder builder, ToXContent.Params params) static Manifest
unknownCurrentTermAndVersion
(long globalGeneration, Map<Index, Long> indexGenerations) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
FORMAT
-
-
Constructor Details
-
Manifest
-
-
Method Details
-
unknownCurrentTermAndVersion
-
getGlobalGeneration
public long getGlobalGeneration()Returns global metadata generation. -
getIndexGenerations
Returns map fromIndex
to index metadata generation. -
getCurrentTerm
public long getCurrentTerm() -
getClusterStateVersion
public long getClusterStateVersion() -
equals
-
hashCode
public int hashCode() -
toString
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
fromXContent
- Throws:
IOException
-
isEmpty
public boolean isEmpty() -
empty
-
isGlobalGenerationMissing
public boolean isGlobalGenerationMissing()
-