public class BlobStoreIndexShardSnapshot extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BlobStoreIndexShardSnapshot.FileInfo
Information about snapshotted file
|
Constructor and Description |
---|
BlobStoreIndexShardSnapshot(String snapshot,
long indexVersion,
List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles,
long startTime,
long time,
int numberOfFiles,
long totalSize)
Constructs new shard snapshot metadata from snapshot metadata
|
Modifier and Type | Method and Description |
---|---|
boolean |
containPhysicalIndexFile(String physicalName)
Returns true if this snapshot contains a file with a given original name
|
BlobStoreIndexShardSnapshot.FileInfo |
findNameFile(String name)
Returns true if this snapshot contains a file with a given name
|
BlobStoreIndexShardSnapshot.FileInfo |
findPhysicalIndexFile(String physicalName) |
static BlobStoreIndexShardSnapshot |
fromXContent(XContentParser parser)
Parses shard snapshot metadata
|
com.google.common.collect.ImmutableList<BlobStoreIndexShardSnapshot.FileInfo> |
indexFiles()
Returns list of files in the shard
|
long |
indexVersion()
Returns index version
|
int |
numberOfFiles()
Returns number of files that where snapshotted
|
String |
snapshot()
Returns snapshot id
|
long |
startTime()
Returns snapshot start time
|
long |
time()
Returns snapshot running time
|
long |
totalSize()
Returns total size of all files that where snapshotted
|
static void |
toXContent(BlobStoreIndexShardSnapshot snapshot,
XContentBuilder builder,
ToXContent.Params params)
Serializes shard snapshot metadata info into JSON
|
public BlobStoreIndexShardSnapshot(String snapshot, long indexVersion, List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, long startTime, long time, int numberOfFiles, long totalSize)
snapshot
- snapshot idindexVersion
- index versionindexFiles
- list of files in the shardstartTime
- snapshot start timetime
- snapshot running timenumberOfFiles
- number of files that where snapshottedtotalSize
- total size of all files snapshottedpublic long indexVersion()
public String snapshot()
public com.google.common.collect.ImmutableList<BlobStoreIndexShardSnapshot.FileInfo> indexFiles()
public long startTime()
public long time()
public int numberOfFiles()
public long totalSize()
public static void toXContent(BlobStoreIndexShardSnapshot snapshot, XContentBuilder builder, ToXContent.Params params) throws IOException
snapshot
- shard snapshot metadatabuilder
- XContent builderparams
- parametersIOException
public static BlobStoreIndexShardSnapshot fromXContent(XContentParser parser) throws IOException
parser
- parserIOException
public boolean containPhysicalIndexFile(String physicalName)
physicalName
- original file namepublic BlobStoreIndexShardSnapshot.FileInfo findPhysicalIndexFile(String physicalName)
public BlobStoreIndexShardSnapshot.FileInfo findNameFile(String name)
name
- file nameCopyright © 2009–2015. All rights reserved.