java.lang.Object
org.elasticsearch.action.DelegatingActionListener<ShardSnapshotResult,ShardSnapshotResult>
org.elasticsearch.repositories.SnapshotShardContext
- All Implemented Interfaces:
ActionListener<ShardSnapshotResult>
- Direct Known Subclasses:
LocalPrimarySnapshotShardContext
public abstract 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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Field Summary
Fields inherited from class org.elasticsearch.action.DelegatingActionListener
delegate -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSnapshotShardContext(SnapshotId snapshotId, IndexId indexId, String shardStateIdentifier, IndexShardSnapshotStatus snapshotStatus, IndexVersion repositoryMetaVersion, long snapshotStartTime, ActionListener<ShardSnapshotResult> listener) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ActionListener<ShardSnapshotResult> listener) abstract booleanabstract voidabstract Collection<String> abstract SnapshotShardContext.FileReaderfileReader(String file, StoreFileMetadata metadata) indexId()abstract booleanabstract Store.MetadataSnapshotvoidonResponse(ShardSnapshotResult result) Complete this listener with a successful (or at least, non-exceptional) response.abstract ShardIdshardId()longstatus()Methods inherited from class org.elasticsearch.action.DelegatingActionListener
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, delegateFailureAndWrap, delegateFailureIgnoreResponseAndWrap, delegateResponse, map, safeMap
-
Constructor Details
-
SnapshotShardContext
protected SnapshotShardContext(SnapshotId snapshotId, IndexId indexId, @Nullable String shardStateIdentifier, IndexShardSnapshotStatus snapshotStatus, IndexVersion repositoryMetaVersion, long snapshotStartTime, ActionListener<ShardSnapshotResult> listener)
-
-
Method Details
-
snapshotId
-
indexId
-
stateIdentifier
-
status
-
getRepositoryMetaVersion
-
snapshotStartTime
public long snapshotStartTime() -
onResponse
Description copied from interface:ActionListenerComplete this listener with a successful (or at least, non-exceptional) response. -
shardId
-
isSearchableSnapshot
public abstract boolean isSearchableSnapshot() -
metadataSnapshot
-
fileNames
-
assertFileContentsMatchHash
-
failStoreIfCorrupted
-
fileReader
public abstract SnapshotShardContext.FileReader fileReader(String file, StoreFileMetadata metadata) throws IOException - Throws:
IOException
-
addListener
-