Use ReusableNormalizedNodePruner in PruningDataTreeModification
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / entityownership / selectionstrategy / EntityOwnerSelectionStrategy.java
index dffbac5fbd3a41d9607396077ff8c9aa3a8e55ff..38899ecc318aad351c2fe6c7369d8491fe6b535d 100644 (file)
@@ -9,23 +9,27 @@
 package org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy;
 
 import java.util.Collection;
+import javax.annotation.Nullable;
 
 /**
  * An EntityOwnerSelectionStrategy is to be used by the EntityOwnershipShard to select a new owner from a collection
- * of candidates
+ * of candidates.
  */
 public interface EntityOwnerSelectionStrategy {
     /**
+     * Returns the time in millis owner selection should be delayed.
      *
      * @return the time in millis owner selection should be delayed
      */
-    long selectionDelayInMillis();
+    long getSelectionDelayInMillis();
 
 
     /**
+     * Selects a new owner from the list of viable candidates.
      *
+     * @param currentOwner the current owner of the entity if any, null otherwise
      * @param viableCandidates the available candidates from which to choose the new owner
      * @return the new owner
      */
-    String newOwner(Collection<String> viableCandidates);
+    String newOwner(@Nullable String currentOwner, Collection<String> viableCandidates);
 }