Class 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 Object
    implements org.onosproject.net.intent.WorkPartitionService
    Manages the assignment of work partitions to instances.
    • 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 AtomicBoolean rebalanceScheduled
      • localNodeId

        protected org.onosproject.cluster.NodeId localNodeId
    • Constructor Detail

      • WorkPartitionManager

        public WorkPartitionManager()
    • Method Detail

      • activate

        public void activate()
      • deactivate

        public void deactivate()
      • isMine

        public <K> boolean isMine​(K id,
                                  Function<K,​Long> hasher)
        Specified by:
        isMine in interface org.onosproject.net.intent.WorkPartitionService
      • getLeader

        public <K> org.onosproject.cluster.NodeId getLeader​(K id,
                                                            Function<K,​Long> hasher)
        Specified by:
        getLeader in interface org.onosproject.net.intent.WorkPartitionService
      • addListener

        public void addListener​(org.onosproject.net.intent.WorkPartitionEventListener listener)
        Specified by:
        addListener in interface org.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:
        removeListener in interface org.onosproject.event.ListenerService<org.onosproject.net.intent.WorkPartitionEvent,​org.onosproject.net.intent.WorkPartitionEventListener>