Class LocalSnapshotStore

  • All Implemented Interfaces:
    akka.actor.Actor, akka.actor.ActorLogging, akka.persistence.snapshot.SnapshotStore

    public class LocalSnapshotStore
    extends akka.persistence.snapshot.japi.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

        akka.actor.Actor.emptyBehavior$, akka.actor.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​(akka.persistence.SnapshotMetadata metadata)  
      scala.concurrent.Future<Void> doDeleteAsync​(String persistenceId, akka.persistence.SnapshotSelectionCriteria criteria)  
      scala.concurrent.Future<Optional<akka.persistence.SelectedSnapshot>> doLoadAsync​(String persistenceId, akka.persistence.SnapshotSelectionCriteria criteria)  
      scala.concurrent.Future<Void> doSaveAsync​(akka.persistence.SnapshotMetadata metadata, Object snapshot)  
      void preStart()  
      • 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 interface akka.persistence.snapshot.SnapshotStore

        akka$persistence$snapshot$SnapshotStore$$senderPersistentActor, akka$persistence$snapshot$SnapshotStore$$tryReceivePluginInternal
    • Constructor Detail

      • LocalSnapshotStore

        public LocalSnapshotStore​(com.typesafe.config.Config config)
    • Method Detail

      • preStart

        public void preStart()
                      throws Exception
        Specified by:
        preStart in interface akka.actor.Actor
        Overrides:
        preStart in class akka.persistence.snapshot.japi.SnapshotStore
        Throws:
        Exception
      • doLoadAsync

        public scala.concurrent.Future<Optional<akka.persistence.SelectedSnapshot>> doLoadAsync​(String persistenceId,
                                                                                                akka.persistence.SnapshotSelectionCriteria criteria)
      • doSaveAsync

        public scala.concurrent.Future<Void> doSaveAsync​(akka.persistence.SnapshotMetadata metadata,
                                                         Object snapshot)
      • doDeleteAsync

        public scala.concurrent.Future<Void> doDeleteAsync​(akka.persistence.SnapshotMetadata metadata)
      • doDeleteAsync

        public scala.concurrent.Future<Void> doDeleteAsync​(String persistenceId,
                                                           akka.persistence.SnapshotSelectionCriteria criteria)