Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Use a singleton instead of an ArrayList
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
entityownership
/
DistributedEntityOwnershipCandidateRegistration.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipCandidateRegistration.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipCandidateRegistration.java
index b92a124b2831adb2a224122db29cdfac6d4d353c..0492cbcc72b6c6a3be7bae1bbc995927aa49a189 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipCandidateRegistration.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipCandidateRegistration.java
@@
-8,7
+8,6
@@
package org.opendaylight.controller.cluster.datastore.entityownership;
import org.opendaylight.controller.md.sal.common.api.clustering.Entity;
package org.opendaylight.controller.cluster.datastore.entityownership;
import org.opendaylight.controller.md.sal.common.api.clustering.Entity;
-import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipCandidate;
import org.opendaylight.controller.md.sal.common.impl.clustering.AbstractEntityOwnershipCandidateRegistration;
/**
import org.opendaylight.controller.md.sal.common.impl.clustering.AbstractEntityOwnershipCandidateRegistration;
/**
@@
-19,21
+18,19
@@
import org.opendaylight.controller.md.sal.common.impl.clustering.AbstractEntityO
class DistributedEntityOwnershipCandidateRegistration extends AbstractEntityOwnershipCandidateRegistration {
private final DistributedEntityOwnershipService service;
class DistributedEntityOwnershipCandidateRegistration extends AbstractEntityOwnershipCandidateRegistration {
private final DistributedEntityOwnershipService service;
- DistributedEntityOwnershipCandidateRegistration(EntityOwnershipCandidate candidate, Entity entity,
- DistributedEntityOwnershipService service) {
- super(candidate, entity);
+ DistributedEntityOwnershipCandidateRegistration(Entity entity, DistributedEntityOwnershipService service) {
+ super(entity);
this.service = service;
}
@Override
protected void removeRegistration() {
this.service = service;
}
@Override
protected void removeRegistration() {
- service.unregisterCandidate(get
Entity(), get
Instance());
+ service.unregisterCandidate(getInstance());
}
@Override
public String toString() {
}
@Override
public String toString() {
- return "DistributedEntityOwnershipCandidateRegistration [entity=" + getEntity() + ", candidate="
- + getInstance() + "]";
+ return "DistributedEntityOwnershipCandidateRegistration [entity=" + getInstance() + "]";
}
}