X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FCohortEntry.java;h=5e5d0f16cd220759c7ad3d1a99dfa8e6c8f61f06;hp=3d5238ee77812eed4190017d7d7a1289887875dd;hb=bb04f62f467cc6e6f0922ba8957b09715707940d;hpb=7b66583e80a8850bcf91c325ee6f6dcfa5036f5f 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(); }