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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA record used to track the new shard generations that have been written for each shard in a snapshot. -
Field Summary
Fields inherited from class org.elasticsearch.action.DelegatingActionListener
delegate -
Constructor Summary
ConstructorsConstructorDescriptionFinalizeSnapshotContext(boolean serializeProjectMetadata, FinalizeSnapshotContext.UpdatedShardGenerations updatedShardGenerations, long repositoryStateId, Metadata clusterMetadata, SnapshotInfo snapshotInfo, IndexVersion repositoryMetaVersion, ActionListener<RepositoryData> listener, Runnable onDone) -
Method Summary
Modifier and TypeMethodDescriptionvoidonDone()voidonResponse(RepositoryData repositoryData) Complete this listener with a successful (or at least, non-exceptional) response.longbooleanupdatedClusterState(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(boolean serializeProjectMetadata, FinalizeSnapshotContext.UpdatedShardGenerations updatedShardGenerations, long repositoryStateId, Metadata clusterMetadata, SnapshotInfo snapshotInfo, IndexVersion repositoryMetaVersion, ActionListener<RepositoryData> listener, Runnable onDone) - Parameters:
serializeProjectMetadata- serialize only the project metadata of the cluster metadataupdatedShardGenerations- updated shard generations for both live and deleted indicesrepositoryStateId- 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
-
serializeProjectMetadata
public boolean serializeProjectMetadata() -
repositoryStateId
public long repositoryStateId() -
updatedShardGenerations
-
snapshotInfo
-
repositoryMetaVersion
-
clusterMetadata
-
obsoleteShardGenerations
-
updatedClusterState
Returns a newClusterState, based on the givenstatewith the create-snapshot entry removed. -
onDone
public void onDone() -
onResponse
Description copied from interface:ActionListenerComplete this listener with a successful (or at least, non-exceptional) response.
-