public static class BlobStoreIndexShardSnapshot.FileInfo
extends java.lang.Object
Constructor | Description |
---|---|
FileInfo(java.lang.String name,
StoreFileMetaData metaData,
ByteSizeValue partSize) |
Constructs a new instance of file info
|
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
canonicalName(java.lang.String blobName) |
Returns base file name from part name
|
java.lang.String |
checksum() |
Returns file md5 checksum provided by
Store |
static BlobStoreIndexShardSnapshot.FileInfo |
fromXContent(XContentParser parser) |
Parses JSON that represents file info
|
boolean |
hasUnknownChecksum() |
Checks if the checksum for the file is unknown.
|
boolean |
isSame(BlobStoreIndexShardSnapshot.FileInfo fileInfo) |
Checks if a file in a store is the same file
|
boolean |
isSame(StoreFileMetaData md) |
Checks if a file in a store is the same file
|
long |
length() |
File length
|
StoreFileMetaData |
metadata() |
Returns the StoreFileMetaData for this file info.
|
java.lang.String |
name() |
Returns the base file name
|
long |
numberOfParts() |
Returns number of parts
|
long |
partBytes(int part) |
Returns the size (in bytes) of a given part
|
java.lang.String |
partName(long part) |
Returns part name if file is stored as multiple parts
|
ByteSizeValue |
partSize() |
Returns part size
|
java.lang.String |
physicalName() |
Returns original file name
|
java.lang.String |
toString() |
|
static void |
toXContent(BlobStoreIndexShardSnapshot.FileInfo file,
XContentBuilder builder,
ToXContent.Params params) |
Serializes file info into JSON
|
public FileInfo(java.lang.String name, StoreFileMetaData metaData, ByteSizeValue partSize)
name
- file name as stored in the blob storemetaData
- the files meta datapartSize
- size of the single chunkpublic java.lang.String name()
public java.lang.String partName(long part)
part
- part numberpublic static java.lang.String canonicalName(java.lang.String blobName)
blobName
- part namepublic java.lang.String physicalName()
public long length()
public ByteSizeValue partSize()
public long partBytes(int part)
public long numberOfParts()
public java.lang.String checksum()
Store
public StoreFileMetaData metadata()
public boolean isSame(StoreFileMetaData md)
md
- file in a storepublic boolean isSame(BlobStoreIndexShardSnapshot.FileInfo fileInfo)
fileInfo
- file in a storepublic boolean hasUnknownChecksum()
public static void toXContent(BlobStoreIndexShardSnapshot.FileInfo file, XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
file
- file infobuilder
- XContent builderparams
- parametersjava.io.IOException
public static BlobStoreIndexShardSnapshot.FileInfo fromXContent(XContentParser parser) throws java.io.IOException
parser
- parserjava.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object