Module org.elasticsearch.server
Package org.elasticsearch.repositories
Class FinalizeSnapshotContext
java.lang.Object
org.elasticsearch.action.DelegatingActionListener<RepositoryData,RepositoryData>
org.elasticsearch.repositories.FinalizeSnapshotContext
- All Implemented Interfaces:
ActionListener<RepositoryData>
public final class FinalizeSnapshotContext
extends DelegatingActionListener<RepositoryData,RepositoryData>
Context for finalizing a snapshot.
-
Field Summary
Fields inherited from class org.elasticsearch.action.DelegatingActionListener
delegate -
Constructor Summary
ConstructorsConstructorDescriptionFinalizeSnapshotContext(ShardGenerations updatedShardGenerations, long repositoryStateId, Metadata clusterMetadata, SnapshotInfo snapshotInfo, IndexVersion repositoryMetaVersion, ActionListener<RepositoryData> listener, Consumer<SnapshotInfo> onDone) -
Method Summary
Modifier and TypeMethodDescriptionvoidonDone(SnapshotInfo snapshotInfo) voidonResponse(RepositoryData repositoryData) Complete this listener with a successful (or at least, non-exceptional) response.longupdatedClusterState(ClusterState state) Returns a newClusterState, based on the givenstatewith the create-snapshot entry removed.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
-
FinalizeSnapshotContext
public FinalizeSnapshotContext(ShardGenerations updatedShardGenerations, long repositoryStateId, Metadata clusterMetadata, SnapshotInfo snapshotInfo, IndexVersion repositoryMetaVersion, ActionListener<RepositoryData> listener, Consumer<SnapshotInfo> onDone) - Parameters:
updatedShardGenerations- updated shard generationsrepositoryStateId- the unique id identifying the state of the repository when the snapshot beganclusterMetadata- cluster metadatasnapshotInfo- SnapshotInfo instance to write for this snapshotrepositoryMetaVersion- version of the updated repository metadata to writelistener- listener to be invoked with the newRepositoryDataafter the snapshot has been successfully added to the repositoryonDone- consumer of the newSnapshotInfofor the snapshot that is invoked after thelisteneronce all cleanup operations after snapshot completion have executed
-
-
Method Details
-
repositoryStateId
public long repositoryStateId() -
updatedShardGenerations
-
snapshotInfo
-
repositoryMetaVersion
-
clusterMetadata
-
obsoleteShardGenerations
-
updatedClusterState
Returns a newClusterState, based on the givenstatewith the create-snapshot entry removed. -
onDone
-
onResponse
Description copied from interface:ActionListenerComplete this listener with a successful (or at least, non-exceptional) response.
-