public static class BlobStoreSnapshot.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
BlobStoreSnapshot |
build()
Builds new BlobStoreSnapshot
|
BlobStoreSnapshot.Builder |
endTime(long endTime)
Sets snapshot end time
|
BlobStoreSnapshot.Builder |
failed(String reason)
Marks snapshot as failed and saves failure reason
|
BlobStoreSnapshot.Builder |
failures(int totalShard,
com.google.common.collect.ImmutableList<SnapshotShardFailure> shardFailures)
Sets the total number of shards and the list of individual shard failures
|
static BlobStoreSnapshot |
fromXContent(XContentParser parser)
Parses the snapshot
|
BlobStoreSnapshot.Builder |
indices(Collection<String> indices)
Sets list of indices in the snapshot
|
BlobStoreSnapshot.Builder |
indices(String[] indices)
Sets list of indices in the snapshot
|
BlobStoreSnapshot.Builder |
name(String name)
Sets snapshot name
|
BlobStoreSnapshot.Builder |
partial()
Marks snapshot as partially successful
|
BlobStoreSnapshot.Builder |
reason(String reason)
Sets snapshot failure reason
|
BlobStoreSnapshot.Builder |
shardFailures(com.google.common.collect.ImmutableList<SnapshotShardFailure> shardFailures)
Sets the list of individual shard failures
|
BlobStoreSnapshot.Builder |
snapshot(BlobStoreSnapshot snapshot)
Copies data from another snapshot into the builder
|
BlobStoreSnapshot.Builder |
startTime(long startTime)
Sets snapshot start time
|
BlobStoreSnapshot.Builder |
state(SnapshotState state)
Sets snapshot state
|
BlobStoreSnapshot.Builder |
success()
Marks snapshot as successful
|
BlobStoreSnapshot.Builder |
successfulShards(int successfulShards)
Sets total number fo shards that were successfully snapshotted
|
BlobStoreSnapshot.Builder |
totalShard(int totalShard)
Sets total number of shards across all snapshot indices
|
static void |
toXContent(BlobStoreSnapshot snapshot,
XContentBuilder builder,
ToXContent.Params params)
Serializes the snapshot
|
BlobStoreSnapshot.Builder |
version(Version version)
Sets version of Elasticsearch that created this snapshot
|
public BlobStoreSnapshot.Builder snapshot(BlobStoreSnapshot snapshot)
snapshot - another snapshotpublic BlobStoreSnapshot.Builder name(String name)
name - snapshot namepublic BlobStoreSnapshot.Builder indices(Collection<String> indices)
indices - list of indicespublic BlobStoreSnapshot.Builder indices(String[] indices)
indices - list of indicespublic BlobStoreSnapshot.Builder state(SnapshotState state)
state - snapshot statepublic BlobStoreSnapshot.Builder reason(String reason)
reason - snapshot failure reasonpublic BlobStoreSnapshot.Builder success()
public BlobStoreSnapshot.Builder partial()
public BlobStoreSnapshot.Builder failed(String reason)
reason - failure reasonpublic BlobStoreSnapshot.Builder version(Version version)
version - versionpublic BlobStoreSnapshot.Builder startTime(long startTime)
startTime - snapshot start timepublic BlobStoreSnapshot.Builder endTime(long endTime)
endTime - snapshot end timepublic BlobStoreSnapshot.Builder totalShard(int totalShard)
totalShard - number of shardspublic BlobStoreSnapshot.Builder successfulShards(int successfulShards)
successfulShards - number of successful shardspublic BlobStoreSnapshot.Builder shardFailures(com.google.common.collect.ImmutableList<SnapshotShardFailure> shardFailures)
shardFailures - list of shard failurespublic BlobStoreSnapshot.Builder failures(int totalShard, com.google.common.collect.ImmutableList<SnapshotShardFailure> shardFailures)
totalShard - number of shardsshardFailures - list of shard failurespublic BlobStoreSnapshot build()
public static void toXContent(BlobStoreSnapshot snapshot, XContentBuilder builder, ToXContent.Params params) throws IOException
snapshot - snapshot to be serializedbuilder - XContent builderparams - serialization parametersIOExceptionpublic static BlobStoreSnapshot fromXContent(XContentParser parser) throws IOException
parser - XContent parserIOExceptionCopyright © 2009–2016. All rights reserved.