Interface TransientSnapshot

All Superinterfaces:
PersistableSnapshot
All Known Implementing Classes:
FileBasedTransientSnapshot

public interface TransientSnapshot extends PersistableSnapshot
A transient snapshot which can be persisted after taking a snapshot.
  • Method Details

    • take

      ActorFuture<Void> take(Consumer<Path> takeSnapshot)
      Takes a snapshot on the given path. This can be persisted later via calling PersistableSnapshot.persist(). Based on the implementation this could mean that this is written before on a temporary folder and then moved to the valid snapshot directory.
      Parameters:
      takeSnapshot - the predicate which should take the snapshot and should return true on success
      Returns:
      a future reflecting the result of the operation
    • withLastFollowupEventPosition

      TransientSnapshot withLastFollowupEventPosition(long followupEventPosition)
      A snapshot is only valid if the accompanying logstream has events from processedPosition up to the last followup event position. The last followUp event position is the position of an event whose source position >= actual processed position in the state.
      Parameters:
      followupEventPosition - position of the followup event which must be in the logstream to ensure that the system can recover from the snapshot and the events in the logstream.
      Returns:
      transient snapshot.