Class SnapshotFiles

java.lang.Object
org.elasticsearch.index.snapshots.blobstore.SnapshotFiles

public class SnapshotFiles extends Object
Contains a list of files participating in a snapshot
  • Constructor Details

    • SnapshotFiles

      public SnapshotFiles(String snapshot, List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, @Nullable String shardStateIdentifier)
      Parameters:
      snapshot - snapshot name
      indexFiles - index files
      shardStateIdentifier - unique identifier for the state of the shard that this snapshot was taken from
  • Method Details

    • snapshot

      public String snapshot()
      Returns snapshot name
      Returns:
      snapshot name
    • withSnapshotName

      public SnapshotFiles withSnapshotName(String snapshotName)
      Creates a new instance with the given snapshot name but otherwise identical to the current instance.
    • isSame

      public boolean isSame(SnapshotFiles other)
      Checks if the given other instance contains the same files as well as the same shardStateIdentifier.
    • shardStateIdentifier

      @Nullable public String shardStateIdentifier()
      Returns an identifier for the shard state that can be used to check whether a shard has changed between snapshots or not.
    • indexFiles

      Returns a list of file in the snapshot
    • containPhysicalIndexFile

      public boolean containPhysicalIndexFile(String physicalName)
      Returns true if this snapshot contains a file with a given original name
      Parameters:
      physicalName - original file name
      Returns:
      true if the file was found, false otherwise
    • totalSize

      public long totalSize()
    • toString

      public String toString()
      Overrides:
      toString in class Object