Class FirstCandidateSelectionStrategy
- java.lang.Object
-
- org.opendaylight.controller.cluster.entityownership.selectionstrategy.AbstractEntityOwnerSelectionStrategy
-
- org.opendaylight.controller.cluster.entityownership.selectionstrategy.FirstCandidateSelectionStrategy
-
- All Implemented Interfaces:
EntityOwnerSelectionStrategy
public class FirstCandidateSelectionStrategy extends AbstractEntityOwnerSelectionStrategy
The FirstCandidateSelectionStrategy always selects the first viable candidate from the list of candidates.
-
-
Field Summary
Fields Modifier and Type Field Description static FirstCandidateSelectionStrategyINSTANCE
-
Constructor Summary
Constructors Constructor Description FirstCandidateSelectionStrategy(long selectionDelayInMillis, Map<String,Long> initialStatistics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringnewOwner(String currentOwner, Collection<String> viableCandidates)Selects a new owner from the list of viable candidates.-
Methods inherited from class org.opendaylight.controller.cluster.entityownership.selectionstrategy.AbstractEntityOwnerSelectionStrategy
getInitialStatistics, getSelectionDelayInMillis
-
-
-
-
Field Detail
-
INSTANCE
public static final FirstCandidateSelectionStrategy INSTANCE
-
-
Method Detail
-
newOwner
public String newOwner(String currentOwner, Collection<String> viableCandidates)
Description copied from interface:EntityOwnerSelectionStrategySelects a new owner from the list of viable candidates.- Parameters:
currentOwner- the current owner of the entity if any, null otherwiseviableCandidates- the available candidates from which to choose the new owner- Returns:
- the new owner
-
-