Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Move Lithium-specific logic from AbstractNormalizedNodeDataOutput
[controller.git]
/
opendaylight
/
md-sal
/
sal-clustering-commons
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
PersistentDataProvider.java
diff --git
a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/PersistentDataProvider.java
b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/PersistentDataProvider.java
index b4f08c0394b38c9ef88772760b084ff5dd7db6df..21102f1f0e368a504bef81e526762ebd79464672 100644
(file)
--- a/
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/PersistentDataProvider.java
+++ b/
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/PersistentDataProvider.java
@@
-7,20
+7,21
@@
*/
package org.opendaylight.controller.cluster;
*/
package org.opendaylight.controller.cluster;
+import static java.util.Objects.requireNonNull;
+
import akka.japi.Procedure;
import akka.japi.Procedure;
+import akka.persistence.AbstractPersistentActor;
import akka.persistence.SnapshotSelectionCriteria;
import akka.persistence.SnapshotSelectionCriteria;
-import akka.persistence.UntypedPersistentActor;
-import com.google.common.base.Preconditions;
/**
* A DataPersistenceProvider implementation with persistence enabled.
*/
public class PersistentDataProvider implements DataPersistenceProvider {
/**
* A DataPersistenceProvider implementation with persistence enabled.
*/
public class PersistentDataProvider implements DataPersistenceProvider {
- private final
Untyped
PersistentActor persistentActor;
+ private final
Abstract
PersistentActor persistentActor;
- public PersistentDataProvider(
Untyped
PersistentActor persistentActor) {
- this.persistentActor =
Preconditions.checkNot
Null(persistentActor, "persistentActor can't be null");
+ public PersistentDataProvider(
Abstract
PersistentActor persistentActor) {
+ this.persistentActor =
requireNon
Null(persistentActor, "persistentActor can't be null");
}
@Override
}
@Override
@@
-33,6
+34,11
@@
public class PersistentDataProvider implements DataPersistenceProvider {
persistentActor.persist(entry, procedure);
}
persistentActor.persist(entry, procedure);
}
+ @Override
+ public <T> void persistAsync(T entry, Procedure<T> procedure) {
+ persistentActor.persistAsync(entry, procedure);
+ }
+
@Override
public void saveSnapshot(Object snapshot) {
persistentActor.saveSnapshot(snapshot);
@Override
public void saveSnapshot(Object snapshot) {
persistentActor.saveSnapshot(snapshot);