@Service public class PartitionManager extends Object implements org.onosproject.net.intent.PartitionService
| 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 AtomicBoolean |
rebalanceScheduled |
| Constructor and Description |
|---|
PartitionManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addListener(org.onosproject.net.intent.PartitionEventListener listener) |
void |
deactivate() |
protected void |
doRebalance() |
org.onosproject.cluster.NodeId |
getLeader(org.onosproject.net.intent.Key intentKey) |
boolean |
isMine(org.onosproject.net.intent.Key intentKey) |
void |
removeListener(org.onosproject.net.intent.PartitionEventListener listener) |
PartitionManager |
withScheduledExecutor(ScheduledExecutorService executor)
Sets the specified executor to be used for scheduling background tasks.
|
@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 AtomicBoolean rebalanceScheduled
@Activate public void activate()
@Deactivate public void deactivate()
public PartitionManager withScheduledExecutor(ScheduledExecutorService executor)
executor - scheduled executor service for background taskspublic boolean isMine(org.onosproject.net.intent.Key intentKey)
isMine in interface org.onosproject.net.intent.PartitionServicepublic org.onosproject.cluster.NodeId getLeader(org.onosproject.net.intent.Key intentKey)
getLeader in interface org.onosproject.net.intent.PartitionServicepublic void addListener(org.onosproject.net.intent.PartitionEventListener listener)
addListener in interface org.onosproject.net.intent.PartitionServicepublic void removeListener(org.onosproject.net.intent.PartitionEventListener listener)
removeListener in interface org.onosproject.net.intent.PartitionServiceprotected void doRebalance()
Copyright © 2015. All rights reserved.