Package org.onosproject.net.intent
Interface WorkPartitionService
-
- All Superinterfaces:
ListenerService<WorkPartitionEvent,WorkPartitionEventListener>
@Beta public interface WorkPartitionService extends ListenerService<WorkPartitionEvent,WorkPartitionEventListener>
Service for partitioning work, represented via a unique identifier, onto cluster nodes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <K> NodeId
getLeader(K id, Function<K,Long> hasher)
Returns the owner for a given identifier.<K> boolean
isMine(K id, Function<K,Long> hasher)
Returns whether a given identifier maps to a partition owned by this instance.-
Methods inherited from interface org.onosproject.event.ListenerService
addListener, removeListener
-
-
-
-
Method Detail
-
isMine
<K> boolean isMine(K id, Function<K,Long> hasher)
Returns whether a given identifier maps to a partition owned by this instance.- Type Parameters:
K
- entity type- Parameters:
id
- identifierhasher
- function that maps identifier to a long value- Returns:
- true if the identifier maps to a partition owned by this instance, otherwise false
-
-