Class BlobStoreIndexShardSnapshot
- java.lang.Object
-
- org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot
-
- All Implemented Interfaces:
ToXContent
,ToXContentFragment
public class BlobStoreIndexShardSnapshot extends java.lang.Object implements ToXContentFragment
Shard snapshot metadata
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlobStoreIndexShardSnapshot.FileInfo
Information about snapshotted file-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description BlobStoreIndexShardSnapshot(java.lang.String snapshot, long indexVersion, java.util.List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, long startTime, long time, int incrementalFileCount, long incrementalSize)
Constructs new shard snapshot metadata from snapshot metadata
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BlobStoreIndexShardSnapshot
fromXContent(XContentParser parser)
Parses shard snapshot metadataint
incrementalFileCount()
Returns incremental of files that were snapshottedlong
incrementalSize()
Returns incremental of files size that were snapshottedjava.util.List<BlobStoreIndexShardSnapshot.FileInfo>
indexFiles()
Returns list of files in the shardlong
indexVersion()
Returns index versionjava.lang.String
snapshot()
Returns snapshot idlong
startTime()
Returns snapshot start timelong
time()
Returns snapshot running timeint
totalFileCount()
Returns total number of files that are referenced by this snapshotlong
totalSize()
Returns total size of all files that where snapshottedXContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
Serializes shard snapshot metadata info into JSON-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Constructor Detail
-
BlobStoreIndexShardSnapshot
public BlobStoreIndexShardSnapshot(java.lang.String snapshot, long indexVersion, java.util.List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, long startTime, long time, int incrementalFileCount, long incrementalSize)
Constructs new shard snapshot metadata from snapshot metadata- Parameters:
snapshot
- snapshot idindexVersion
- index versionindexFiles
- list of files in the shardstartTime
- snapshot start timetime
- snapshot running timeincrementalFileCount
- incremental of files that were snapshottedincrementalSize
- incremental size of snapshot
-
-
Method Detail
-
indexVersion
public long indexVersion()
Returns index version- Returns:
- index version
-
snapshot
public java.lang.String snapshot()
Returns snapshot id- Returns:
- snapshot id
-
indexFiles
public java.util.List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles()
Returns list of files in the shard- Returns:
- list of files
-
startTime
public long startTime()
Returns snapshot start time
-
time
public long time()
Returns snapshot running time
-
incrementalFileCount
public int incrementalFileCount()
Returns incremental of files that were snapshotted
-
totalFileCount
public int totalFileCount()
Returns total number of files that are referenced by this snapshot
-
incrementalSize
public long incrementalSize()
Returns incremental of files size that were snapshotted
-
totalSize
public long totalSize()
Returns total size of all files that where snapshotted
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
Serializes shard snapshot metadata info into JSON- Specified by:
toXContent
in interfaceToXContent
- Parameters:
builder
- XContent builderparams
- parameters- Throws:
java.io.IOException
-
fromXContent
public static BlobStoreIndexShardSnapshot fromXContent(XContentParser parser) throws java.io.IOException
Parses shard snapshot metadata- Parameters:
parser
- parser- Returns:
- shard snapshot metadata
- Throws:
java.io.IOException
-
-