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 SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description <K> NodeIdgetLeader(K id, java.util.function.Function<K,java.lang.Long> hasher)Returns the owner for a given identifier.<K> booleanisMine(K id, java.util.function.Function<K,java.lang.Long> hasher)Returns whether a given identifier maps to a partition owned by this instance.- 
Methods inherited from interface org.onosproject.event.ListenerServiceaddListener, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
isMine<K> boolean isMine(K id, java.util.function.Function<K,java.lang.Long> hasher)Returns whether a given identifier maps to a partition owned by this instance.- Type Parameters:
- K- entity type
- Parameters:
- id- identifier
- hasher- function that maps identifier to a long value
- Returns:
- true if the identifier maps to a partition owned by this instance, otherwise false
 
 - 
getLeader<K> NodeId getLeader(K id, java.util.function.Function<K,java.lang.Long> hasher) Returns the owner for a given identifier.- Type Parameters:
- K- entity type
- Parameters:
- id- identifier to query
- hasher- function that maps id to a long value
- Returns:
- the leader node identifier
 
 
- 
 
-