Class Manifest

org.elasticsearch.cluster.metadata.Manifest
All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public class Manifest extends 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

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Manifest​(long currentTerm, long clusterStateVersion, long globalGeneration, <> indexGenerations)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Manifest
     
    boolean
     o)
     
    static Manifest
    fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
     
    long
     
    long
     
    long
    Returns global metadata generation.
    <>
    Returns map from Index to index metadata generation.
    int
     
    boolean
     
    boolean
     
     
    org.elasticsearch.common.xcontent.XContentBuilder
    toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
     
    static Manifest
    unknownCurrentTermAndVersion​(long globalGeneration, <> indexGenerations)
     

    Methods inherited from class java.lang.

    , , , , , , ,

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

    isFragment
  • Field Details

  • Constructor Details

    • Manifest

      public Manifest(long currentTerm, long clusterStateVersion, long globalGeneration, <> indexGenerations)
  • Method Details

    • unknownCurrentTermAndVersion

      public static Manifest unknownCurrentTermAndVersion(long globalGeneration, <> indexGenerations)
    • getGlobalGeneration

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

      public <> getIndexGenerations()
      Returns map from Index to index metadata generation.
    • getCurrentTerm

      public long getCurrentTerm()
    • getClusterStateVersion

      public long getClusterStateVersion()
    • equals

      public boolean equals( o)
      Overrides:
       in class 
    • hashCode

      public int hashCode()
      Overrides:
       in class 
    • toString

      public  toString()
      Overrides:
       in class 
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
    • fromXContent

      public static Manifest fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws
      Throws:
    • isEmpty

      public boolean isEmpty()
    • empty

      public static Manifest empty()
    • isGlobalGenerationMissing

      public boolean isGlobalGenerationMissing()