@Service
public class WorkPartitionManager
extends java.lang.Object
implements org.onosproject.net.intent.WorkPartitionService
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.cluster.ClusterService |
clusterService |
protected org.onosproject.event.EventDeliveryService |
eventDispatcher |
protected org.onosproject.cluster.LeadershipService |
leadershipService |
protected org.onosproject.cluster.NodeId |
localNodeId |
protected java.util.concurrent.atomic.AtomicBoolean |
rebalanceScheduled |
| Constructor and Description |
|---|
WorkPartitionManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addListener(org.onosproject.net.intent.WorkPartitionEventListener listener) |
void |
deactivate() |
<K> org.onosproject.cluster.NodeId |
getLeader(K id,
java.util.function.Function<K,java.lang.Long> hasher) |
<K> boolean |
isMine(K id,
java.util.function.Function<K,java.lang.Long> hasher) |
void |
removeListener(org.onosproject.net.intent.WorkPartitionEventListener listener) |
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.LeadershipService leadershipService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.ClusterService clusterService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.event.EventDeliveryService eventDispatcher
protected final java.util.concurrent.atomic.AtomicBoolean rebalanceScheduled
protected org.onosproject.cluster.NodeId localNodeId
@Activate public void activate()
@Deactivate public void deactivate()
public <K> boolean isMine(K id,
java.util.function.Function<K,java.lang.Long> hasher)
isMine in interface org.onosproject.net.intent.WorkPartitionServicepublic <K> org.onosproject.cluster.NodeId getLeader(K id,
java.util.function.Function<K,java.lang.Long> hasher)
getLeader in interface org.onosproject.net.intent.WorkPartitionServicepublic void addListener(org.onosproject.net.intent.WorkPartitionEventListener listener)
addListener in interface org.onosproject.event.ListenerService<org.onosproject.net.intent.WorkPartitionEvent,org.onosproject.net.intent.WorkPartitionEventListener>public void removeListener(org.onosproject.net.intent.WorkPartitionEventListener listener)
removeListener in interface org.onosproject.event.ListenerService<org.onosproject.net.intent.WorkPartitionEvent,org.onosproject.net.intent.WorkPartitionEventListener>