java.lang.Object
org.elasticsearch.action.DelegatingActionListener<ShardSnapshotResult,ShardSnapshotResult>
org.elasticsearch.repositories.SnapshotShardContext
- All Implemented Interfaces:
ActionListener<ShardSnapshotResult>
public final class SnapshotShardContext
extends DelegatingActionListener<ShardSnapshotResult,ShardSnapshotResult>
Context holding the state for creating a shard snapshot via
Repository.snapshotShard(SnapshotShardContext)
.
Wraps a Engine.IndexCommitRef
that is released once this instances is completed by invoking
either its onResponse(ShardSnapshotResult)
or DelegatingActionListener.onFailure(Exception)
callback.-
Field Summary
Fields inherited from class org.elasticsearch.action.DelegatingActionListener
delegate
-
Constructor Summary
ConstructorDescriptionSnapshotShardContext
(Store store, MapperService mapperService, SnapshotId snapshotId, IndexId indexId, SnapshotIndexCommit commitRef, String shardStateIdentifier, IndexShardSnapshotStatus snapshotStatus, IndexVersion repositoryMetaVersion, long snapshotStartTime, ActionListener<ShardSnapshotResult> listener) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.index.IndexCommit
indexId()
void
onResponse
(ShardSnapshotResult result) Handle action response.long
status()
store()
Methods inherited from class org.elasticsearch.action.DelegatingActionListener
onFailure, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.action.ActionListener
delegateFailure, delegateFailureAndWrap, delegateResponse, map, safeMap
-
Constructor Details
-
SnapshotShardContext
public SnapshotShardContext(Store store, MapperService mapperService, SnapshotId snapshotId, IndexId indexId, SnapshotIndexCommit commitRef, @Nullable String shardStateIdentifier, IndexShardSnapshotStatus snapshotStatus, IndexVersion repositoryMetaVersion, long snapshotStartTime, ActionListener<ShardSnapshotResult> listener) - Parameters:
store
- store to be snapshottedmapperService
- the shards mapper servicesnapshotId
- snapshot idindexId
- id for the index being snapshottedcommitRef
- commit point referenceshardStateIdentifier
- a unique identifier of the state of the shard that is stored with the shard's snapshot and used to detect if the shard has changed between snapshots. Ifnull
is passed as the identifier snapshotting will be done by inspecting the physical files referenced bysnapshotIndexCommit
snapshotStatus
- snapshot statusrepositoryMetaVersion
- version of the updated repository metadata to writesnapshotStartTime
- start time of the snapshot found inSnapshotsInProgress.Entry.startTime()
listener
- listener invoked on completion
-
-
Method Details
-
store
-
mapperService
-
snapshotId
-
indexId
-
indexCommit
public org.apache.lucene.index.IndexCommit indexCommit() -
stateIdentifier
-
status
-
getRepositoryMetaVersion
-
snapshotStartTime
public long snapshotStartTime() -
onResponse
Description copied from interface:ActionListener
Handle action response. This response may constitute a failure or a success but it is up to the listener to make that decision. -
withCommitRef
-