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%2FAbstractTransactionContextFactory.java;h=69c69bb84b395dc5d89db35f74cdd44343987c95;hp=b5afd596bf3b1ded0abdbaceb9c80e309ccaacda;hb=ef3b9a8300db1c791f2c4088d39152ccf9f5b97c;hpb=c796596b5c46b5203c30b143e6282662e66c5642 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java index b5afd596bf..69c69bb84b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java @@ -62,7 +62,9 @@ abstract class AbstractTransactionContextFactory findPrimaryFuture = findPrimaryShard(shardName, parent.getIdentifier()); - if(findPrimaryFuture.isCompleted()) { + if (findPrimaryFuture.isCompleted()) { Try maybe = findPrimaryFuture.value().get(); - if(maybe.isSuccess()) { + if (maybe.isSuccess()) { onFindPrimaryShardSuccess(maybe.get(), parent, shardName, transactionContextWrapper); } else { onFindPrimaryShardFailure(maybe.failed().get(), parent, shardName, transactionContextWrapper); @@ -144,13 +145,13 @@ abstract class AbstractTransactionContextFactory maybeDataTree = primaryShardInfo.getLocalShardDataTree(); if (maybeDataTree.isPresent()) { - if(!knownLocal.containsKey(shardName)) { + if (!knownLocal.containsKey(shardName)) { LOG.debug("Shard {} resolved to local data tree - adding local factory", shardName); F factory = factoryForShard(shardName, primaryShardInfo.getPrimaryShardActor(), maybeDataTree.get()); knownLocal.putIfAbsent(shardName, factory); } - } else if(knownLocal.containsKey(shardName)) { + } else if (knownLocal.containsKey(shardName)) { LOG.debug("Shard {} invalidating local data tree", shardName); knownLocal.remove(shardName); @@ -183,8 +184,8 @@ abstract class AbstractTransactionContextFactory void onTransactionReady(@Nonnull TransactionIdentifier transaction, @Nonnull Collection> cohortFutures); + protected abstract void onTransactionReady(@Nonnull TransactionIdentifier transaction, + @Nonnull Collection> cohortFutures); /** * Callback invoked when the internal TransactionContext has been created for a transaction. @@ -208,7 +210,7 @@ abstract class AbstractTransactionContextFactory