Interface SnapshotTransferService

All Superinterfaces:
AsyncClosable
All Known Subinterfaces:
SnapshotSenderService
All Known Implementing Classes:
SnapshotTransferServiceImpl

public interface SnapshotTransferService extends AsyncClosable
  • Method Details

    • getLatestSnapshot

      ActorFuture<SnapshotChunk> getLatestSnapshot(int partition, long lastProcessedPosition, UUID transferId)
      Initiate the transfer of the latest snapshot for a partition.
      Parameters:
      partition - the partition to get the snapshot from
      lastProcessedPosition - the minimum value of lastProcessedPosition that the snapshot must have
      transferId - an identifier to trace the transfer
      Returns:
      the first SnapshotChunk. It must be used in subsequent calls to getNextChunk(int, java.lang.String, java.lang.String, java.util.UUID)
    • getNextChunk

      ActorFuture<SnapshotChunk> getNextChunk(int partition, String snapshotId, String previousChunkName, UUID transferId)
      Get the next chunk for the snapshot.
      Parameters:
      partition - the partition to request the snapshot from
      snapshotId - the snapshotId of the snapshot being transferred
      previousChunkName - the chunkName of the previous chunk, so that the next one can be identified
      Returns:
      null if there is no other chunk or the SnapshotChunk after