Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NormalizedNodeAggregator should also report empty
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
DataTreeCohortActorRegistry.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActorRegistry.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActorRegistry.java
index 2859671ac6bd886f0212c0b8153e193b18ff831e..f213cc7588ab3c6d3b7794bf10ac914824ce9477 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActorRegistry.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActorRegistry.java
@@
-5,14
+5,14
@@
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.cluster.datastore;
package org.opendaylight.controller.cluster.datastore;
+import static java.util.Objects.requireNonNull;
+
import akka.actor.ActorRef;
import akka.actor.PoisonPill;
import akka.actor.Status;
import akka.util.Timeout;
import akka.actor.ActorRef;
import akka.actor.PoisonPill;
import akka.actor.Status;
import akka.util.Timeout;
-import com.google.common.base.Preconditions;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import java.util.ArrayList;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import java.util.ArrayList;
@@
-30,9
+30,9
@@
import org.opendaylight.mdsal.dom.spi.RegistrationTreeNode;
import org.opendaylight.mdsal.dom.spi.RegistrationTreeSnapshot;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.mdsal.dom.spi.RegistrationTreeSnapshot;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
-import org.opendaylight.yangtools.yang.data.
api.schema.tree
.DataTreeCandidate;
-import org.opendaylight.yangtools.yang.data.
api.schema.tree
.DataTreeCandidateNode;
-import org.opendaylight.yangtools.yang.data.
api.schema.tree
.ModificationType;
+import org.opendaylight.yangtools.yang.data.
tree.api
.DataTreeCandidate;
+import org.opendaylight.yangtools.yang.data.
tree.api
.DataTreeCandidateNode;
+import org.opendaylight.yangtools.yang.data.
tree.api
.ModificationType;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@
-97,11
+97,10
@@
class DataTreeCohortActorRegistry extends AbstractRegistrationTree<ActorRef> {
}
abstract static class CohortRegistryCommand {
}
abstract static class CohortRegistryCommand {
-
private final ActorRef cohort;
CohortRegistryCommand(final ActorRef cohort) {
private final ActorRef cohort;
CohortRegistryCommand(final ActorRef cohort) {
- this.cohort =
Preconditions.checkNot
Null(cohort);
+ this.cohort =
requireNon
Null(cohort);
}
ActorRef getCohort() {
}
ActorRef getCohort() {
@@
-110,40
+109,34
@@
class DataTreeCohortActorRegistry extends AbstractRegistrationTree<ActorRef> {
}
static class RegisterCohort extends CohortRegistryCommand {
}
static class RegisterCohort extends CohortRegistryCommand {
-
private final DOMDataTreeIdentifier path;
RegisterCohort(final DOMDataTreeIdentifier path, final ActorRef cohort) {
super(cohort);
this.path = path;
private final DOMDataTreeIdentifier path;
RegisterCohort(final DOMDataTreeIdentifier path, final ActorRef cohort) {
super(cohort);
this.path = path;
-
}
public DOMDataTreeIdentifier getPath() {
return path;
}
}
public DOMDataTreeIdentifier getPath() {
return path;
}
-
}
static class RemoveCohort extends CohortRegistryCommand {
}
static class RemoveCohort extends CohortRegistryCommand {
-
RemoveCohort(final ActorRef cohort) {
super(cohort);
}
RemoveCohort(final ActorRef cohort) {
super(cohort);
}
-
}
private static class CanCommitMessageBuilder {
}
private static class CanCommitMessageBuilder {
-
+ private final Multimap<ActorRef, DOMDataTreeCandidate> actorToCandidates = ArrayListMultimap.create();
private final TransactionIdentifier txId;
private final DataTreeCandidate candidate;
private final SchemaContext schema;
private final TransactionIdentifier txId;
private final DataTreeCandidate candidate;
private final SchemaContext schema;
- private final Multimap<ActorRef, DOMDataTreeCandidate> actorToCandidates = ArrayListMultimap.create();
CanCommitMessageBuilder(final TransactionIdentifier txId, final DataTreeCandidate candidate,
final SchemaContext schema) {
CanCommitMessageBuilder(final TransactionIdentifier txId, final DataTreeCandidate candidate,
final SchemaContext schema) {
- this.txId =
Preconditions.checkNot
Null(txId);
- this.candidate =
Preconditions.checkNot
Null(candidate);
+ this.txId =
requireNon
Null(txId);
+ this.candidate =
requireNon
Null(candidate);
this.schema = schema;
}
this.schema = schema;
}