public class DelegatingPersistentDataProvider extends Object implements DataPersistenceProvider
Constructor and Description |
---|
DelegatingPersistentDataProvider(DataPersistenceProvider delegate) |
Modifier and Type | Method and Description |
---|---|
void |
deleteMessages(long sequenceNumber)
Deletes journal entries up to the given sequence number.
|
void |
deleteSnapshots(akka.persistence.SnapshotSelectionCriteria criteria)
Deletes snapshots based on the given criteria.
|
DataPersistenceProvider |
getDelegate() |
long |
getLastSequenceNumber()
Returns the last sequence number contained in the journal.
|
boolean |
isRecoveryApplicable()
Returns whether or not persistence recovery is applicable/enabled.
|
<T> void |
persist(T entry,
akka.japi.Procedure<T> procedure)
Persists an entry to the applicable journal synchronously.
|
<T> void |
persistAsync(T entry,
akka.japi.Procedure<T> procedure)
Persists an entry to the applicable journal asynchronously.
|
void |
saveSnapshot(Object entry)
Saves a snapshot.
|
void |
setDelegate(DataPersistenceProvider delegate) |
public DelegatingPersistentDataProvider(DataPersistenceProvider delegate)
public void setDelegate(DataPersistenceProvider delegate)
public DataPersistenceProvider getDelegate()
public boolean isRecoveryApplicable()
DataPersistenceProvider
isRecoveryApplicable
in interface DataPersistenceProvider
public <T> void persist(T entry, akka.japi.Procedure<T> procedure)
DataPersistenceProvider
persist
in interface DataPersistenceProvider
T
- the type of the journal entryentry
- the journal entry to persistprocedure
- the callback when persistence is completepublic <T> void persistAsync(T entry, akka.japi.Procedure<T> procedure)
DataPersistenceProvider
persistAsync
in interface DataPersistenceProvider
T
- the type of the journal entryentry
- the journal entry to persistprocedure
- the callback when persistence is completepublic void saveSnapshot(Object entry)
DataPersistenceProvider
saveSnapshot
in interface DataPersistenceProvider
entry
- the snapshot object to savepublic void deleteSnapshots(akka.persistence.SnapshotSelectionCriteria criteria)
DataPersistenceProvider
deleteSnapshots
in interface DataPersistenceProvider
criteria
- the search criteriapublic void deleteMessages(long sequenceNumber)
DataPersistenceProvider
deleteMessages
in interface DataPersistenceProvider
sequenceNumber
- the sequence numberpublic long getLastSequenceNumber()
DataPersistenceProvider
getLastSequenceNumber
in interface DataPersistenceProvider
Copyright © 2019 OpenDaylight. All rights reserved.