Class SnapshotFiles
java.lang.Object
org.elasticsearch.index.snapshots.blobstore.SnapshotFiles
Contains a list of files participating in a snapshot
-
Constructor Summary
ConstructorDescriptionSnapshotFiles(String snapshot, List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, String shardStateIdentifier)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containPhysicalIndexFile(String physicalName)
Returns true if this snapshot contains a file with a given original namefindPhysicalIndexFile(String physicalName)
Returns information about a physical file with the given nameReturns a list of file in the snapshotboolean
isSame(SnapshotFiles other)
Checks if the given other instance contains the same files as well as the sameshardStateIdentifier
.Returns an identifier for the shard state that can be used to check whether a shard has changed between snapshots or not.snapshot()
Returns snapshot nametoString()
long
withSnapshotName(String snapshotName)
Creates a new instance with the given snapshot name but otherwise identical to the current instance.
-
Constructor Details
-
SnapshotFiles
public SnapshotFiles(String snapshot, List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, @Nullable String shardStateIdentifier)- Parameters:
snapshot
- snapshot nameindexFiles
- index filesshardStateIdentifier
- unique identifier for the state of the shard that this snapshot was taken from
-
-
Method Details
-
snapshot
Returns snapshot name- Returns:
- snapshot name
-
withSnapshotName
Creates a new instance with the given snapshot name but otherwise identical to the current instance. -
isSame
Checks if the given other instance contains the same files as well as the sameshardStateIdentifier
. -
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
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
-
findPhysicalIndexFile
Returns information about a physical file with the given name- Parameters:
physicalName
- the original file name- Returns:
- information about this file
-
totalSize
public long totalSize() -
toString
-