Class IndexMetaDataGenerations

org.elasticsearch.repositories.IndexMetaDataGenerations

public final class IndexMetaDataGenerations extends
  • Field Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
    • getIndexMetaBlobId

      @Nullable public  getIndexMetaBlobId( metaIdentifier)
      Gets the blob id by the identifier of IndexMetadata (computed via buildUniqueIdentifier(org.elasticsearch.cluster.metadata.IndexMetadata)) or null if none is tracked for the identifier.
      Parameters:
      metaIdentifier - identifier for IndexMetadata
      Returns:
      blob id for the given metadata identifier or null if the identifier is not part of the repository yet
    • indexMetaBlobId

      public  indexMetaBlobId(SnapshotId snapshotId, IndexId indexId)
      Get the blob id by SnapshotId and IndexId and fall back to the value of SnapshotId.getUUID() if none is known to enable backwards compatibility with versions older than SnapshotsService.SHARD_GEN_IN_REPO_DATA_VERSION which used the snapshot uuid as index metadata blob uuid.
      Parameters:
      snapshotId - Snapshot Id
      indexId - Index Id
      Returns:
      blob id for the given index metadata
    • withAddedSnapshot

      public IndexMetaDataGenerations withAddedSnapshot(SnapshotId snapshotId, <> newLookup, <,​> newIdentifiers)
      Create a new instance with the given snapshot and index metadata uuids and identifiers added.
      Parameters:
      snapshotId - SnapshotId
      newLookup - new mappings of index + snapshot to index metadata identifier
      newIdentifiers - new mappings of index metadata identifier to blob id
      Returns:
      instance with added snapshot
    • withRemovedSnapshots

      public <SnapshotId> snapshotIds)
      Create a new instance with the given snapshot removed.
      Parameters:
      snapshotIds - SnapshotIds to remove
      Returns:
      new instance without the given snapshot
    • hashCode

      public int hashCode()
      Overrides:
       in class 
    • equals

      public boolean equals( that)
      Overrides:
       in class 
    • toString

      public  toString()
      Overrides:
       in class 
    • buildUniqueIdentifier

      public static  buildUniqueIdentifier(IndexMetadata indexMetaData)
      Compute identifier for IndexMetadata from its index- and history-uuid as well as its settings-, mapping- and alias-version. If an index did not see a change in its settings, mappings or aliases between two points in time then the identifier will not change between them either.
      Parameters:
      indexMetaData - IndexMetaData
      Returns:
      identifier string