Class WorkPartitionManager
- java.lang.Object
-
- org.onosproject.store.intent.impl.WorkPartitionManager
-
- All Implemented Interfaces:
org.onosproject.event.ListenerService<org.onosproject.net.intent.WorkPartitionEvent,org.onosproject.net.intent.WorkPartitionEventListener>,org.onosproject.net.intent.WorkPartitionService
public class WorkPartitionManager extends java.lang.Object implements org.onosproject.net.intent.WorkPartitionServiceManages the assignment of work partitions to instances.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.onosproject.cluster.ClusterServiceclusterServiceprotected org.onosproject.event.EventDeliveryServiceeventDispatcherprotected org.onosproject.cluster.LeadershipServiceleadershipServiceprotected org.onosproject.cluster.NodeIdlocalNodeIdprotected java.util.concurrent.atomic.AtomicBooleanrebalanceScheduled
-
Constructor Summary
Constructors Constructor Description WorkPartitionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()voidaddListener(org.onosproject.net.intent.WorkPartitionEventListener listener)voiddeactivate()<K> org.onosproject.cluster.NodeIdgetLeader(K id, java.util.function.Function<K,java.lang.Long> hasher)<K> booleanisMine(K id, java.util.function.Function<K,java.lang.Long> hasher)voidremoveListener(org.onosproject.net.intent.WorkPartitionEventListener listener)
-
-
-
Field Detail
-
leadershipService
protected org.onosproject.cluster.LeadershipService leadershipService
-
clusterService
protected org.onosproject.cluster.ClusterService clusterService
-
eventDispatcher
protected org.onosproject.event.EventDeliveryService eventDispatcher
-
rebalanceScheduled
protected final java.util.concurrent.atomic.AtomicBoolean rebalanceScheduled
-
localNodeId
protected org.onosproject.cluster.NodeId localNodeId
-
-
Method Detail
-
activate
public void activate()
-
deactivate
public void deactivate()
-
isMine
public <K> boolean isMine(K id, java.util.function.Function<K,java.lang.Long> hasher)- Specified by:
isMinein interfaceorg.onosproject.net.intent.WorkPartitionService
-
getLeader
public <K> org.onosproject.cluster.NodeId getLeader(K id, java.util.function.Function<K,java.lang.Long> hasher)- Specified by:
getLeaderin interfaceorg.onosproject.net.intent.WorkPartitionService
-
addListener
public void addListener(org.onosproject.net.intent.WorkPartitionEventListener listener)
- Specified by:
addListenerin interfaceorg.onosproject.event.ListenerService<org.onosproject.net.intent.WorkPartitionEvent,org.onosproject.net.intent.WorkPartitionEventListener>
-
removeListener
public void removeListener(org.onosproject.net.intent.WorkPartitionEventListener listener)
- Specified by:
removeListenerin interfaceorg.onosproject.event.ListenerService<org.onosproject.net.intent.WorkPartitionEvent,org.onosproject.net.intent.WorkPartitionEventListener>
-
-