X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FCohortEntry.java;h=5e5d0f16cd220759c7ad3d1a99dfa8e6c8f61f06;hb=74367138bb5e9f0357c474227c9a1fac691a0a28;hp=3d5238ee77812eed4190017d7d7a1289887875dd;hpb=ff61d45f1244acba2ae41a62084d1193943bd6d1;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/CohortEntry.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/CohortEntry.java index 3d5238ee77..5e5d0f16cd 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/CohortEntry.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/CohortEntry.java @@ -32,6 +32,7 @@ final class CohortEntry { private Shard shard; private CohortEntry(final ReadWriteShardDataTreeTransaction transaction, final short clientVersion) { + this.cohort = null; this.transaction = Preconditions.checkNotNull(transaction); this.transactionId = transaction.getIdentifier(); this.clientVersion = clientVersion; @@ -122,6 +123,10 @@ final class CohortEntry { } } + boolean isSealed() { + return cohort != null; + } + Optional> getParticipatingShardNames() { return cohort != null ? cohort.getParticipatingShardNames() : Optional.empty(); }