akka.persistence.snapshot.local
Class LocalSnapshotStore

java.lang.Object
  extended by akka.persistence.snapshot.local.LocalSnapshotStore
All Implemented Interfaces:
Actor, ActorLogging, SnapshotStore

public class LocalSnapshotStore
extends java.lang.Object
implements SnapshotStore, ActorLogging

INTERNAL API.

Local filesystem backed snapshot store.


Nested Class Summary
 
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$
 
Constructor Summary
LocalSnapshotStore()
           
 
Method Summary
 void delete(SnapshotMetadata metadata)
          Plugin API: deletes the snapshot identified by metadata.
 void delete(java.lang.String persistenceId, SnapshotSelectionCriteria criteria)
          Plugin API: deletes all snapshots matching criteria.
protected  Snapshot deserialize(java.io.InputStream inputStream)
           
 scala.concurrent.Future<scala.Option<SelectedSnapshot>> loadAsync(java.lang.String persistenceId, SnapshotSelectionCriteria criteria)
          Plugin API: asynchronously loads a snapshot.
 void preStart()
          User overridable callback.
protected  void save(SnapshotMetadata metadata, java.lang.Object snapshot)
           
 scala.concurrent.Future<scala.runtime.BoxedUnit> saveAsync(SnapshotMetadata metadata, java.lang.Object snapshot)
          Plugin API: asynchronously saves a snapshot.
 void saved(SnapshotMetadata metadata)
          Plugin API: called after successful saving of a snapshot.
protected  void serialize(java.io.OutputStream outputStream, Snapshot snapshot)
           
protected  java.io.File withOutputStream(SnapshotMetadata metadata, scala.Function1<java.io.OutputStream,scala.runtime.BoxedUnit> p)
           
 
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
extension, publish, receive
 
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, postRestart, postStop, preRestart, self, sender, supervisorStrategy, unhandled
 
Methods inherited from interface akka.actor.ActorLogging
_log, log
 

Constructor Detail

LocalSnapshotStore

public LocalSnapshotStore()
Method Detail

loadAsync

public scala.concurrent.Future<scala.Option<SelectedSnapshot>> loadAsync(java.lang.String persistenceId,
                                                                         SnapshotSelectionCriteria criteria)
Description copied from interface: SnapshotStore
Plugin API: asynchronously loads a snapshot.

Specified by:
loadAsync in interface SnapshotStore
Parameters:
persistenceId - processor id.
criteria - selection criteria for loading.
Returns:
(undocumented)

saveAsync

public scala.concurrent.Future<scala.runtime.BoxedUnit> saveAsync(SnapshotMetadata metadata,
                                                                  java.lang.Object snapshot)
Description copied from interface: SnapshotStore
Plugin API: asynchronously saves a snapshot.

Specified by:
saveAsync in interface SnapshotStore
Parameters:
metadata - snapshot metadata.
snapshot - snapshot.
Returns:
(undocumented)

saved

public void saved(SnapshotMetadata metadata)
Description copied from interface: SnapshotStore
Plugin API: called after successful saving of a snapshot.

Specified by:
saved in interface SnapshotStore
Parameters:
metadata - snapshot metadata.

delete

public void delete(SnapshotMetadata metadata)
Description copied from interface: SnapshotStore
Plugin API: deletes the snapshot identified by metadata.

Specified by:
delete in interface SnapshotStore
Parameters:
metadata - snapshot metadata.

delete

public void delete(java.lang.String persistenceId,
                   SnapshotSelectionCriteria criteria)
Description copied from interface: SnapshotStore
Plugin API: deletes all snapshots matching criteria.

Specified by:
delete in interface SnapshotStore
Parameters:
persistenceId - processor id.
criteria - selection criteria for deleting.

save

protected void save(SnapshotMetadata metadata,
                    java.lang.Object snapshot)

deserialize

protected Snapshot deserialize(java.io.InputStream inputStream)

serialize

protected void serialize(java.io.OutputStream outputStream,
                         Snapshot snapshot)

withOutputStream

protected java.io.File withOutputStream(SnapshotMetadata metadata,
                                        scala.Function1<java.io.OutputStream,scala.runtime.BoxedUnit> p)

preStart

public void preStart()
Description copied from interface: Actor
User overridable callback.

Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation.

Specified by:
preStart in interface Actor