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(ShardGenerations updatedShardGenerations, long repositoryStateId, Metadata clusterMetadata, SnapshotInfo snapshotInfo, IndexVersion repositoryMetaVersion, ActionListener<RepositoryData> listener, Consumer<SnapshotInfo> onDone)
      Parameters:
      updatedShardGenerations - updated shard generations
      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

    • repositoryStateId

      public long repositoryStateId()
    • updatedShardGenerations

      public ShardGenerations 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)
    • onDone

      public void onDone(SnapshotInfo snapshotInfo)
    • onResponse

      public void onResponse(RepositoryData repositoryData)
      Description copied from interface: ActionListener
      Handle action response. This response may constitute a failure or a success but it is up to the listener to make that decision.