Module org.elasticsearch.server
Class BlobStoreIndexShardSnapshot
java.lang.Object
org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot
- All Implemented Interfaces:
ToXContent,ToXContentFragment
Shard snapshot metadata
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classInformation about snapshotted fileNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionBlobStoreIndexShardSnapshot(String snapshot, List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, long startTime, long time, int incrementalFileCount, long incrementalSize) Constructs new shard snapshot metadata from snapshot metadata -
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance has a different name and zero incremental file counts but is identical to this instance in terms of the files it references.static BlobStoreIndexShardSnapshotfromXContent(XContentParser parser) Parses shard snapshot metadataintReturns incremental of files that were snapshottedlongReturns incremental of files size that were snapshottedReturns list of files in the shardsnapshot()Returns snapshot namelongReturns snapshot start timelongtime()Returns snapshot running timeintReturns total number of files that are referenced by this snapshotlongReturns total size of all files that where snapshottedstatic longtotalSize(List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles) toXContent(XContentBuilder builder, ToXContent.Params params) Serializes shard snapshot metadata info into JSONMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
BlobStoreIndexShardSnapshot
public BlobStoreIndexShardSnapshot(String snapshot, List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, long startTime, long time, int incrementalFileCount, long incrementalSize) Constructs new shard snapshot metadata from snapshot metadata- Parameters:
snapshot- snapshot nameindexFiles- list of files in the shardstartTime- snapshot start timetime- snapshot running timeincrementalFileCount- incremental of files that were snapshottedincrementalSize- incremental size of snapshot
-
-
Method Details
-
asClone
Creates a new instance has a different name and zero incremental file counts but is identical to this instance in terms of the files it references.- Parameters:
targetSnapshotName- target snapshot namestartTime- time the clone operation on the repository was startedtime- time it took to create the clone
-
snapshot
Returns snapshot name- Returns:
- snapshot name
-
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 -
totalSize
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException Serializes shard snapshot metadata info into JSON- Specified by:
toXContentin interfaceToXContent- Parameters:
builder- XContent builderparams- parameters- Throws:
IOException
-
fromXContent
Parses shard snapshot metadata- Parameters:
parser- parser- Returns:
- shard snapshot metadata
- Throws:
IOException
-