public class LocalSnapshotStore extends java.lang.Object implements SnapshotStore, akka.actor.ActorLogging
Local filesystem backed snapshot store.
Constructor and Description |
---|
LocalSnapshotStore() |
Modifier and Type | Method and Description |
---|---|
scala.concurrent.Future<scala.runtime.BoxedUnit> |
deleteAsync(SnapshotMetadata metadata)
Plugin API: deletes the snapshot identified by
metadata . |
scala.concurrent.Future<scala.runtime.BoxedUnit> |
deleteAsync(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() |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receivePluginInternal()
Plugin API
Allows plugin implementers to use
f pipeTo self and
handle additional messages for implementing advanced features |
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.
|
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
breaker, extension, publish, receive, receiveSnapshotStore, senderPersistentActor, tryReceivePluginInternal
public scala.concurrent.Future<scala.Option<SelectedSnapshot>> loadAsync(java.lang.String persistenceId, SnapshotSelectionCriteria criteria)
SnapshotStore
This call is protected with a circuit-breaker.
loadAsync
in interface SnapshotStore
persistenceId
- id of the persistent actor.criteria
- selection criteria for loading.public scala.concurrent.Future<scala.runtime.BoxedUnit> saveAsync(SnapshotMetadata metadata, java.lang.Object snapshot)
SnapshotStore
This call is protected with a circuit-breaker.
saveAsync
in interface SnapshotStore
metadata
- snapshot metadata.snapshot
- snapshot.public scala.concurrent.Future<scala.runtime.BoxedUnit> deleteAsync(SnapshotMetadata metadata)
SnapshotStore
metadata
.
This call is protected with a circuit-breaker.
deleteAsync
in interface SnapshotStore
metadata
- snapshot metadata.public scala.concurrent.Future<scala.runtime.BoxedUnit> deleteAsync(java.lang.String persistenceId, SnapshotSelectionCriteria criteria)
SnapshotStore
criteria
.
This call is protected with a circuit-breaker.
deleteAsync
in interface SnapshotStore
persistenceId
- id of the persistent actor.criteria
- selection criteria for deleting.public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receivePluginInternal()
SnapshotStore
f pipeTo self
and
handle additional messages for implementing advanced featuresreceivePluginInternal
in interface SnapshotStore
protected void save(SnapshotMetadata metadata, java.lang.Object snapshot)
protected Snapshot deserialize(java.io.InputStream inputStream)
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)
public void preStart()
preStart
in interface akka.actor.Actor