BUG 4615 : Add method on EOS to check if a candidate is registered locally
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / clustering / EntityOwnershipService.java
index 311d1b8595565eb2390b9aef15db10644d041514..a042bf5ef2fdfd71ac2d9b82f87f641e95eca6da 100644 (file)
@@ -58,4 +58,12 @@ public interface EntityOwnershipService {
      * @return an Optional EntityOwnershipState whose instance is present if the entity is found
      */
     Optional<EntityOwnershipState> getOwnershipState(@Nonnull Entity forEntity);
+
+    /**
+     * Check if a local candidate is registered for the given entity
+     *
+     * @param entity
+     * @return true if a candidate was registered locally, false otherwise
+     */
+    boolean isCandidateRegistered(@Nonnull Entity entity);
 }