Adjust to yangtools-2.0.0 changes
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / entityownership / DistributedEntityOwnershipCandidateRegistration.java
index 94c7aa09766c4382f2085fbd0b1dae06b39daff4..4d65c55b83e43e8ff1b1d1c74b4b316f103fb43b 100644 (file)
@@ -7,26 +7,27 @@
  */
 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.mdsal.eos.dom.api.DOMEntity;
+import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipCandidateRegistration;
+import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
 
 /**
  * Implementation of EntityOwnershipCandidateRegistration.
  *
  * @author Thomas Pantelis
  */
-class DistributedEntityOwnershipCandidateRegistration extends AbstractEntityOwnershipCandidateRegistration {
+class DistributedEntityOwnershipCandidateRegistration extends AbstractObjectRegistration<DOMEntity>
+        implements DOMEntityOwnershipCandidateRegistration {
     private final DistributedEntityOwnershipService service;
 
-    DistributedEntityOwnershipCandidateRegistration(EntityOwnershipCandidate candidate, Entity entity,
-            DistributedEntityOwnershipService service) {
-        super(candidate, entity);
+    DistributedEntityOwnershipCandidateRegistration(final DOMEntity entity,
+            final DistributedEntityOwnershipService service) {
+        super(entity);
         this.service = service;
     }
 
     @Override
-    public void close() {
-        service.unregisterCandidate(getEntity(), getInstance());
+    protected void removeRegistration() {
+        service.unregisterCandidate(getInstance());
     }
 }