X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fentityownership%2Fselectionstrategy%2FEntityOwnerSelectionStrategy.java;h=38899ecc318aad351c2fe6c7369d8491fe6b535d;hb=14f35cba90e93b69f038a243a6dd4eadac933a58;hp=53b35f65c404c81aabce94fcd0b83406c8258ee3;hpb=1c66a277c9791984fab3b70f8e93d61795b2fe15;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategy.java index 53b35f65c4..38899ecc31 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategy.java @@ -9,14 +9,15 @@ package org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy; import java.util.Collection; -import java.util.Map; +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 */ @@ -24,11 +25,11 @@ public interface EntityOwnerSelectionStrategy { /** + * 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 - * @param statistics contains a snapshot of a mapping between candidate names and the number of entities - * owned by that candidate * @return the new owner */ - String newOwner(Collection viableCandidates, Map statistics); + String newOwner(@Nullable String currentOwner, Collection viableCandidates); }