public interface StorageEngine
This interface does not specify any query capabilities, which, of course, would be query engine specific. Instead it just specifies the minimum functionality required to reload a storage engine from its changelog as well as basic lifecycle management.
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.nio.file.Path> |
checkpoint(CheckpointId id)
Checkpoint store snapshots.
|
void |
flush()
Flush any cached messages
|
StoreProperties |
getStoreProperties()
Get store properties
|
void |
restore(ChangelogSSPIterator envelopes)
Restore the content of this StorageEngine from the changelog.
|
void |
stop()
Close the storage engine
|
void restore(ChangelogSSPIterator envelopes) throws java.lang.InterruptedException
Iterator
and not deserialized for
efficiency, allowing the implementation to optimize replay, if possible.
The implementers are expected to handle interrupt signals to the restoration thread and rethrow the exception to
upstream so that TaskRestoreManager
can accordingly notify the container.envelopes
- An iterator of envelopes that the storage engine can read from to
restore its state on startup.java.lang.InterruptedException
- when received interrupts during restorationvoid flush()
@InterfaceStability.Unstable java.util.Optional<java.nio.file.Path> checkpoint(CheckpointId id)
void stop()
StoreProperties getStoreProperties()