@Service public class ReplicaInfoManager extends Object implements ReplicaInfoService
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.event.EventDeliveryService |
eventDispatcher |
protected org.onosproject.event.ListenerRegistry<ReplicaInfoEvent,ReplicaInfoEventListener> |
listenerRegistry |
protected org.onosproject.mastership.MastershipService |
mastershipService |
| Constructor and Description |
|---|
ReplicaInfoManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addListener(ReplicaInfoEventListener listener)
Adds the specified replica placement info change listener.
|
void |
deactivate() |
ReplicaInfo |
getReplicaInfoFor(org.onosproject.net.DeviceId deviceId)
Returns the placement information for given Device.
|
void |
removeListener(ReplicaInfoEventListener listener)
Removes the specified replica placement info change listener.
|
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.event.EventDeliveryService eventDispatcher
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.mastership.MastershipService mastershipService
protected final org.onosproject.event.ListenerRegistry<ReplicaInfoEvent,ReplicaInfoEventListener> listenerRegistry
@Activate public void activate()
@Deactivate public void deactivate()
public ReplicaInfo getReplicaInfoFor(org.onosproject.net.DeviceId deviceId)
ReplicaInfoServicegetReplicaInfoFor in interface ReplicaInfoServicedeviceId - identifier of the devicepublic void addListener(ReplicaInfoEventListener listener)
ReplicaInfoServiceaddListener in interface ReplicaInfoServicelistener - the replica placement info change listenerpublic void removeListener(ReplicaInfoEventListener listener)
ReplicaInfoServiceremoveListener in interface ReplicaInfoServicelistener - the replica placement info change listener