Class LocalSnapshotStore
- java.lang.Object
-
- akka.persistence.snapshot.japi.SnapshotStore
-
- org.opendaylight.controller.cluster.persistence.LocalSnapshotStore
-
- All Implemented Interfaces:
Actor,ActorLogging,SnapshotStore
public class LocalSnapshotStore extends SnapshotStore
Akka SnapshotStore implementation backed by the local file system. This class was patterned after akka's LocalSnapshotStore class and exists because akka's version serializes to a byte[] before persisting to the file which will fail if the data reaches or exceeds Integer.MAX_VALUE in size. This class avoids that issue by serializing the data directly to the file.- Author:
- Thomas Pantelis
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Constructor Summary
Constructors Constructor Description LocalSnapshotStore(com.typesafe.config.Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.concurrent.Future<Void>doDeleteAsync(SnapshotMetadata metadata)scala.concurrent.Future<Void>doDeleteAsync(String persistenceId, SnapshotSelectionCriteria criteria)scala.concurrent.Future<Optional<SelectedSnapshot>>doLoadAsync(String persistenceId, SnapshotSelectionCriteria criteria)scala.concurrent.Future<Void>doSaveAsync(SnapshotMetadata metadata, Object snapshot)voidpreStart()-
Methods inherited from class akka.persistence.snapshot.japi.SnapshotStore
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, akka$actor$ActorLogging$$_log, akka$actor$ActorLogging$$_log_$eq, akka$persistence$snapshot$SnapshotStore$_setter_$akka$persistence$snapshot$SnapshotStore$$breaker_$eq, akka$persistence$snapshot$SnapshotStore$_setter_$akka$persistence$snapshot$SnapshotStore$$extension_$eq, akka$persistence$snapshot$SnapshotStore$_setter_$akka$persistence$snapshot$SnapshotStore$$publish_$eq, akka$persistence$snapshot$SnapshotStore$_setter_$receiveSnapshotStore_$eq, akka$persistence$snapshot$SnapshotStore$$breaker, akka$persistence$snapshot$SnapshotStore$$extension, akka$persistence$snapshot$SnapshotStore$$publish, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, deleteAsync, deleteAsync, loadAsync, log, postRestart, postStop, preRestart, receive, receivePluginInternal, receiveSnapshotStore, saveAsync, self, sender, supervisorStrategy, unhandled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.persistence.snapshot.SnapshotStore
akka$persistence$snapshot$SnapshotStore$$senderPersistentActor, akka$persistence$snapshot$SnapshotStore$$tryReceivePluginInternal
-
-
-
-
Method Detail
-
preStart
public void preStart() throws Exception- Specified by:
preStartin interfaceActor- Overrides:
preStartin classSnapshotStore- Throws:
Exception
-
doLoadAsync
public scala.concurrent.Future<Optional<SelectedSnapshot>> doLoadAsync(String persistenceId, SnapshotSelectionCriteria criteria)
-
doSaveAsync
public scala.concurrent.Future<Void> doSaveAsync(SnapshotMetadata metadata, Object snapshot)
-
doDeleteAsync
public scala.concurrent.Future<Void> doDeleteAsync(SnapshotMetadata metadata)
-
doDeleteAsync
public scala.concurrent.Future<Void> doDeleteAsync(String persistenceId, SnapshotSelectionCriteria criteria)
-
-