public class AbstractVirtualStore<E extends org.onosproject.event.Event,D extends org.onosproject.store.StoreDelegate<E>> extends Object implements VirtualStore<E,D>
| Modifier and Type | Field and Description |
|---|---|
protected Map<NetworkId,D> |
delegateMap |
| Constructor and Description |
|---|
AbstractVirtualStore() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasDelegate(NetworkId networkId)
Indicates whether the store has a delegate.
|
protected void |
notifyDelegate(NetworkId networkId,
E event)
Notifies the delegate with the specified event.
|
protected void |
notifyDelegate(NetworkId networkId,
List<E> events)
Notifies the delegate with the specified list of events.
|
void |
setDelegate(NetworkId networkId,
D delegate)
Sets the delegate on the store.
|
void |
unsetDelegate(NetworkId networkId,
D delegate)
Withdraws the delegate from the store.
|
public void setDelegate(NetworkId networkId, D delegate)
VirtualStoresetDelegate in interface VirtualStore<E extends org.onosproject.event.Event,D extends org.onosproject.store.StoreDelegate<E>>networkId - a virtual network identifierdelegate - new store delegatepublic void unsetDelegate(NetworkId networkId, D delegate)
VirtualStoreunsetDelegate in interface VirtualStore<E extends org.onosproject.event.Event,D extends org.onosproject.store.StoreDelegate<E>>networkId - a virtual network identifierdelegate - store delegate to withdrawpublic boolean hasDelegate(NetworkId networkId)
VirtualStorehasDelegate in interface VirtualStore<E extends org.onosproject.event.Event,D extends org.onosproject.store.StoreDelegate<E>>networkId - a virtual network identifierprotected void notifyDelegate(NetworkId networkId, E event)
networkId - a virtual network identifierevent - event to delegate