Class Manifest

  • All Implemented Interfaces:
    ToXContent, ToXContentFragment

    public class Manifest
    extends java.lang.Object
    implements 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().
    • Constructor Detail

      • Manifest

        public Manifest​(long currentTerm,
                        long clusterStateVersion,
                        long globalGeneration,
                        java.util.Map<Index,​java.lang.Long> indexGenerations)
    • Method Detail

      • unknownCurrentTermAndVersion

        public static Manifest unknownCurrentTermAndVersion​(long globalGeneration,
                                                            java.util.Map<Index,​java.lang.Long> indexGenerations)
      • getGlobalGeneration

        public long getGlobalGeneration()
        Returns global metadata generation.
      • getIndexGenerations

        public java.util.Map<Index,​java.lang.Long> getIndexGenerations()
        Returns map from Index to index metadata generation.
      • getCurrentTerm

        public long getCurrentTerm()
      • getClusterStateVersion

        public long getClusterStateVersion()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • fromXContent

        public static Manifest fromXContent​(XContentParser parser)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • isEmpty

        public boolean isEmpty()
      • empty

        public static Manifest empty()
      • isGlobalGenerationMissing

        public boolean isGlobalGenerationMissing()