Interface EntityOwnerSelectionStrategy
-
- All Known Implementing Classes:
AbstractEntityOwnerSelectionStrategy,FirstCandidateSelectionStrategy,LeastLoadedCandidateSelectionStrategy
public interface EntityOwnerSelectionStrategyAn EntityOwnerSelectionStrategy is to be used by the EntityOwnershipShard to select a new owner from a collection of candidates.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetSelectionDelayInMillis()Returns the time in millis owner selection should be delayed.StringnewOwner(@Nullable String currentOwner, Collection<String> viableCandidates)Selects a new owner from the list of viable candidates.
-
-
-
Method Detail
-
getSelectionDelayInMillis
long getSelectionDelayInMillis()
Returns the time in millis owner selection should be delayed.- Returns:
- the time in millis owner selection should be delayed
-
newOwner
String newOwner(@Nullable String currentOwner, Collection<String> viableCandidates)
Selects 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
-
-