Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Deprecate CloseTransaction protobuff message
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
messages
/
PrimaryShardInfo.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/PrimaryShardInfo.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/PrimaryShardInfo.java
index bbeb1aa84bbe728ffe073e9a3cc5402161fde676..cad0a4569ec8214927133fb13040f0b8fea13ffc 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/PrimaryShardInfo.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/PrimaryShardInfo.java
@@
-20,10
+20,13
@@
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
*/
public class PrimaryShardInfo {
private final ActorSelection primaryShardActor;
*/
public class PrimaryShardInfo {
private final ActorSelection primaryShardActor;
+ private final short primaryShardVersion;
private final Optional<DataTree> localShardDataTree;
private final Optional<DataTree> localShardDataTree;
- public PrimaryShardInfo(@Nonnull ActorSelection primaryShardActor, @Nonnull Optional<DataTree> localShardDataTree) {
+ public PrimaryShardInfo(@Nonnull ActorSelection primaryShardActor, short primaryShardVersion,
+ @Nonnull Optional<DataTree> localShardDataTree) {
this.primaryShardActor = Preconditions.checkNotNull(primaryShardActor);
this.primaryShardActor = Preconditions.checkNotNull(primaryShardActor);
+ this.primaryShardVersion = primaryShardVersion;
this.localShardDataTree = Preconditions.checkNotNull(localShardDataTree);
}
this.localShardDataTree = Preconditions.checkNotNull(localShardDataTree);
}
@@
-34,6
+37,13
@@
public class PrimaryShardInfo {
return primaryShardActor;
}
return primaryShardActor;
}
+ /**
+ * Returns the version of the primary shard.
+ */
+ public short getPrimaryShardVersion() {
+ return primaryShardVersion;
+ }
+
/**
* Returns an Optional whose value contains the primary shard's DataTree if the primary shard is local
* to the caller. Otherwise the Optional value is absent.
/**
* Returns an Optional whose value contains the primary shard's DataTree if the primary shard is local
* to the caller. Otherwise the Optional value is absent.