Class FinalizeSnapshotContext

All Implemented Interfaces:
ActionListener<RepositoryData>

public final class FinalizeSnapshotContext extends DelegatingActionListener<RepositoryData,RepositoryData>
Context for finalizing a snapshot.
  • 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 metadata
      updatedShardGenerations - updated shard generations for both live and deleted indices
      repositoryStateId - the unique id identifying the state of the repository when the snapshot began
      clusterMetadata - cluster metadata
      snapshotInfo - SnapshotInfo instance to write for this snapshot
      repositoryMetaVersion - version of the updated repository metadata to write
      listener - listener to be invoked with the new RepositoryData after the snapshot has been successfully added to the repository
      onDone - consumer of the new SnapshotInfo for the snapshot that is invoked after the listener once all cleanup operations after snapshot completion have executed
  • Method Details

    • serializeProjectMetadata

      public boolean serializeProjectMetadata()
    • repositoryStateId

      public long repositoryStateId()
    • updatedShardGenerations

      public FinalizeSnapshotContext.UpdatedShardGenerations updatedShardGenerations()
    • snapshotInfo

      public SnapshotInfo snapshotInfo()
    • repositoryMetaVersion

      public IndexVersion repositoryMetaVersion()
    • clusterMetadata

      public Metadata clusterMetadata()
    • obsoleteShardGenerations

      public Map<RepositoryShardId,Set<ShardGeneration>> obsoleteShardGenerations()
    • updatedClusterState

      public ClusterState updatedClusterState(ClusterState state)
      Returns a new ClusterState, based on the given state with the create-snapshot entry removed.
    • onDone

      public void onDone()
    • onResponse

      public void onResponse(RepositoryData repositoryData)
      Description copied from interface: ActionListener
      Complete this listener with a successful (or at least, non-exceptional) response.