Package org.onosproject.store.flow.impl
Class ReplicaInfoManager
- java.lang.Object
-
- org.onosproject.store.flow.impl.ReplicaInfoManager
-
- All Implemented Interfaces:
ReplicaInfoService
public class ReplicaInfoManager extends java.lang.Object implements ReplicaInfoService
Manages replica placement information.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.onosproject.event.EventDeliveryServiceeventDispatcherprotected org.onosproject.event.ListenerRegistry<ReplicaInfoEvent,ReplicaInfoEventListener>listenerRegistryprotected org.onosproject.mastership.MastershipServicemastershipService
-
Constructor Summary
Constructors Constructor Description ReplicaInfoManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()voidaddListener(ReplicaInfoEventListener listener)Adds the specified replica placement info change listener.voiddeactivate()ReplicaInfogetReplicaInfoFor(org.onosproject.net.DeviceId deviceId)Returns the placement information for given Device.voidremoveListener(ReplicaInfoEventListener listener)Removes the specified replica placement info change listener.
-
-
-
Field Detail
-
eventDispatcher
protected org.onosproject.event.EventDeliveryService eventDispatcher
-
mastershipService
protected org.onosproject.mastership.MastershipService mastershipService
-
listenerRegistry
protected final org.onosproject.event.ListenerRegistry<ReplicaInfoEvent,ReplicaInfoEventListener> listenerRegistry
-
-
Method Detail
-
activate
public void activate()
-
deactivate
public void deactivate()
-
getReplicaInfoFor
public ReplicaInfo getReplicaInfoFor(org.onosproject.net.DeviceId deviceId)
Description copied from interface:ReplicaInfoServiceReturns the placement information for given Device.- Specified by:
getReplicaInfoForin interfaceReplicaInfoService- Parameters:
deviceId- identifier of the device- Returns:
- placement information
-
addListener
public void addListener(ReplicaInfoEventListener listener)
Description copied from interface:ReplicaInfoServiceAdds the specified replica placement info change listener.- Specified by:
addListenerin interfaceReplicaInfoService- Parameters:
listener- the replica placement info change listener
-
removeListener
public void removeListener(ReplicaInfoEventListener listener)
Description copied from interface:ReplicaInfoServiceRemoves the specified replica placement info change listener.- Specified by:
removeListenerin interfaceReplicaInfoService- Parameters:
listener- the replica placement info change listener
-
-