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=8f30cbc0ba2676e883faadba10f757881983b2d0;hp=e86c3a11513a6b2a83974b330bcd6baef8c96bcd;hpb=eb359c6eaee33eb91ac26ac8a3439be4ae1a974a;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 e86c3a1151..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,13 +9,15 @@ 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 */ @@ -23,9 +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 * @return the new owner */ - String newOwner(Collection viableCandidates); + String newOwner(@Nullable String currentOwner, Collection viableCandidates); }