Package io.deephaven.persistence
Interface Persistence.Callbacks<UpdateType>
- All Known Implementing Classes:
PersistentHashtable
- Enclosing interface:
- Persistence<UpdateType>
public static interface Persistence.Callbacks<UpdateType>
Represents the Persistence instance's communication with the in-memory state of the collection.
-
Method Summary
Modifier and TypeMethodDescriptionCalled to obtain an atomic (?) snapshot of the contents of the persistent collection in preparation for writing a checkpoint.voidHandle an update read from the persistent cache while the persistent collection is being initialized.voidreleaseCheckPoint(List<UpdateType> checkpoint) Called once for every call to getCheckPoint(), to indicate that the persistence implementation is finished with the checkpoint list and the objects contained within it.
-
Method Details
-
handlePersistenceInitializationUpdate
Handle an update read from the persistent cache while the persistent collection is being initialized. This should be called *only* during initPersistence().- Parameters:
obj- The object just read from the persistent stream.
-
getCheckPoint
List<UpdateType> getCheckPoint()Called to obtain an atomic (?) snapshot of the contents of the persistent collection in preparation for writing a checkpoint. The persistence policy that the PersistenceImpl was instantiated with controls when checkpoints are written, so this call may come at any time.- Returns:
- the list of UpdateType objects (commands) representing the current state of the collection
-
releaseCheckPoint
Called once for every call to getCheckPoint(), to indicate that the persistence implementation is finished with the checkpoint list and the objects contained within it.- Parameters:
checkpoint- the checkpoint from the getCheckPoint() call
-