Package org.elasticsearch.repositories
Class SnapshotShardContext
java.lang.Object
org.elasticsearch.action.ActionListener.Delegating<ShardSnapshotResult,ShardSnapshotResult>
org.elasticsearch.repositories.SnapshotShardContext
- All Implemented Interfaces:
ActionListener<ShardSnapshotResult>
public final class SnapshotShardContext
extends ActionListener.Delegating<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 ActionListener.Delegating.onFailure(Exception) callback.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.action.ActionListener
ActionListener.Delegating<Response,DelegateResponse>, ActionListener.DelegatingActionListener<T>, ActionListener.DelegatingFailureActionListener<T,R>, ActionListener.MappedActionListener<Response,MappedResponse>, ActionListener.RunAfterActionListener<T>, ActionListener.RunBeforeActionListener<T> -
Field Summary
Fields inherited from class org.elasticsearch.action.ActionListener.Delegating
delegate -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotShardContext(Store store, MapperService mapperService, SnapshotId snapshotId, IndexId indexId, Engine.IndexCommitRef commitRef, String shardStateIdentifier, IndexShardSnapshotStatus snapshotStatus, Version repositoryMetaVersion, Map<String,Object> userMetadata, ActionListener<ShardSnapshotResult> listener) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.index.IndexCommitindexId()voidonResponse(ShardSnapshotResult result)Handle action response.status()store()Methods inherited from class org.elasticsearch.action.ActionListener.Delegating
onFailure, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.action.ActionListener
delegateFailure, delegateResponse, map
-
Constructor Details
-
SnapshotShardContext
public SnapshotShardContext(Store store, MapperService mapperService, SnapshotId snapshotId, IndexId indexId, Engine.IndexCommitRef commitRef, @Nullable String shardStateIdentifier, IndexShardSnapshotStatus snapshotStatus, Version repositoryMetaVersion, Map<String,Object> userMetadata, 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. Ifnullis passed as the identifier snapshotting will be done by inspecting the physical files referenced bysnapshotIndexCommitsnapshotStatus- snapshot statusrepositoryMetaVersion- version of the updated repository metadata to writeuserMetadata- user metadata of the snapshot found inSnapshotsInProgress.Entry.userMetadata()listener- listener invoked on completion
-
-
Method Details
-
store
-
mapperService
-
snapshotId
-
indexId
-
indexCommit
public org.apache.lucene.index.IndexCommit indexCommit() -
stateIdentifier
-
status
-
getRepositoryMetaVersion
-
userMetadata
-
onResponse
Description copied from interface:ActionListenerHandle action response. This response may constitute a failure or a success but it is up to the listener to make that decision.
-