+per #3641 Storage plugin API
- Journal plugin API for storage backends with asynchronous client API (default impl: in-memory journal) - Journal plugin API for storage backends with synchronous client API (default impl: LevelDB journal) - Snapshot store plugin API (default impl: local filesystem snapshot store)
This commit is contained in:
parent
1bda2a43d5
commit
da7490bbc9
33 changed files with 1454 additions and 474 deletions
|
|
@ -17,12 +17,12 @@ object SnapshotExample extends App {
|
|||
var state = ExampleState()
|
||||
|
||||
def receive = {
|
||||
case Persistent(s, snr) ⇒ state = state.update(s"${s}-${snr}")
|
||||
case SaveSnapshotSucceeded(metadata) ⇒ // ...
|
||||
case SaveSnapshotFailed(metadata, reason) ⇒ // ...
|
||||
case SnapshotOffer(_, s: ExampleState) ⇒ println("offered state = " + s); state = s
|
||||
case "print" ⇒ println("current state = " + state)
|
||||
case "snap" ⇒ saveSnapshot(state)
|
||||
case Persistent(s, snr) ⇒ state = state.update(s"${s}-${snr}")
|
||||
case SaveSnapshotSuccess(metadata) ⇒ // ...
|
||||
case SaveSnapshotFailure(metadata, reason) ⇒ // ...
|
||||
case SnapshotOffer(_, s: ExampleState) ⇒ println("offered state = " + s); state = s
|
||||
case "print" ⇒ println("current state = " + state)
|
||||
case "snap" ⇒ saveSnapshot(state)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue