CONTROLLER-1641: Handle commit cohorts async 85/66885/6
authorTom Pantelis <tompantelis@gmail.com>
Fri, 5 Jan 2018 01:04:41 +0000 (20:04 -0500)
committerRobert Varga <nite@hq.sk>
Mon, 5 Feb 2018 00:21:11 +0000 (00:21 +0000)
commitf81bccec7ac422dbcfdfba70dcfa22f9824b8e4c
tree1ec069491d46c931083c0230b06b492a71699a88
parentcb90ab104f31168b0d5ff6c7a547c8cc1cc50bef
CONTROLLER-1641: Handle commit cohorts async

Modified CompositeDataTreeCohort to handle response messages from
the DataTreeCohortActor async. The canCommit, preCommit, and commit
methods now return an Optional CompletionStage that is present when
there are commit cohorts. On completion of the cohort actor Futures, a
Runnable is executed in the shard actor to process the responses and
complete the returned CompletionStage. The call sites in
SimpleShardDataTreeCohort execute their own callbacks on completion.

Change-Id: Ib1a22e059dabfe87a1ee141baae655601f9ce700
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/CompositeDataTreeCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActorRegistry.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.