public static class BlobStoreIndexShardSnapshot.FileInfo extends Object
| Constructor and Description |
|---|
BlobStoreIndexShardSnapshot.FileInfo(String name,
StoreFileMetaData metaData,
ByteSizeValue partSize)
Constructs a new instance of file info
|
| Modifier and Type | Method and Description |
|---|---|
static String |
canonicalName(String blobName)
Returns base file name from part name
|
String |
checksum()
Returns file md5 checksum provided by
Store |
static BlobStoreIndexShardSnapshot.FileInfo |
fromXContent(XContentParser parser)
Parses JSON that represents file info
|
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.
|
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
|
String |
partName(long part)
Returns part name if file is stored as multiple parts
|
ByteSizeValue |
partSize()
Returns part size
|
String |
physicalName()
Returns original file name
|
static void |
toXContent(BlobStoreIndexShardSnapshot.FileInfo file,
XContentBuilder builder,
ToXContent.Params params)
Serializes file info into JSON
|
public BlobStoreIndexShardSnapshot.FileInfo(String name, StoreFileMetaData metaData, ByteSizeValue partSize)
name - file name as stored in the blob storemetaData - the files meta datapartSize - size of the single chunkpublic String name()
public String partName(long part)
part - part numberpublic static String canonicalName(String blobName)
blobName - part namepublic String physicalName()
public long length()
public ByteSizeValue partSize()
public long partBytes(int part)
public long numberOfParts()
@Nullable public String checksum()
Storepublic StoreFileMetaData metadata()
public boolean isSame(StoreFileMetaData md)
md - file in a storepublic boolean isSame(BlobStoreIndexShardSnapshot.FileInfo fileInfo)
fileInfo - file in a storepublic static void toXContent(BlobStoreIndexShardSnapshot.FileInfo file, XContentBuilder builder, ToXContent.Params params) throws IOException
file - file infobuilder - XContent builderparams - parametersIOExceptionpublic static BlobStoreIndexShardSnapshot.FileInfo fromXContent(XContentParser parser) throws IOException
parser - parserIOExceptionCopyright © 2009–2017. All rights reserved.