Bug 4105: Implement UnregisterCandidateLocal in EntityOwnershipShard
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / entityownership / DistributedEntityOwnershipService.java
index f51f57944321ce14887518097de7d3f4d8f2d907..bfdda4ce706aab635cc5c2fe7ed68c289b8e9910 100644 (file)
@@ -76,7 +76,6 @@ public class DistributedEntityOwnershipService implements EntityOwnershipService
             public void onComplete(Throwable failure, Object response) {
                 if(failure != null) {
                     LOG.debug("Error sending message {} to {}", message, shardActor, failure);
-                    // TODO - queue for retry
                 } else {
                     LOG.debug("{} message to {} succeeded", message, shardActor, failure);
                 }
@@ -121,10 +120,10 @@ public class DistributedEntityOwnershipService implements EntityOwnershipService
         return new DistributedEntityOwnershipCandidateRegistration(candidate, entity, this);
     }
 
-    void unregisterCandidate(Entity entity) {
+    void unregisterCandidate(Entity entity, EntityOwnershipCandidate entityOwnershipCandidate) {
         LOG.debug("Unregistering candidate for {}", entity);
 
-        executeLocalEntityOwnershipShardOperation(new UnregisterCandidateLocal(entity));
+        executeLocalEntityOwnershipShardOperation(new UnregisterCandidateLocal(entityOwnershipCandidate, entity));
         registeredEntities.remove(entity);
     }