Package org.onosproject.store
Class AbstractStore<E extends Event,D extends StoreDelegate<E>>
- java.lang.Object
 - 
- org.onosproject.store.AbstractStore<E,D>
 
 
- 
- All Implemented Interfaces:
 Store<E,D>
- Direct Known Subclasses:
 ApplicationArchive,DistributedComponentConfigStore
public class AbstractStore<E extends Event,D extends StoreDelegate<E>> extends Object implements Store<E,D>
Base implementation of a store. 
- 
- 
Constructor Summary
Constructors Constructor Description AbstractStore() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasDelegate()Indicates whether the store has a delegate.protected voidnotifyDelegate(E event)Notifies the delegate with the specified event.protected voidnotifyDelegate(List<E> events)Notifies the delegate with the specified list of events.voidsetDelegate(D delegate)Sets the delegate on the store.voidunsetDelegate(D delegate)Withdraws the delegate from the store. 
 - 
 
- 
- 
Field Detail
- 
delegate
protected D extends StoreDelegate<E> delegate
 
 - 
 
- 
Method Detail
- 
setDelegate
public void setDelegate(D delegate)
Description copied from interface:StoreSets the delegate on the store.- Specified by:
 setDelegatein interfaceStore<E extends Event,D extends StoreDelegate<E>>- Parameters:
 delegate- new store delegate
 
- 
unsetDelegate
public void unsetDelegate(D delegate)
Description copied from interface:StoreWithdraws the delegate from the store.- Specified by:
 unsetDelegatein interfaceStore<E extends Event,D extends StoreDelegate<E>>- Parameters:
 delegate- store delegate to withdraw
 
- 
hasDelegate
public boolean hasDelegate()
Description copied from interface:StoreIndicates whether the store has a delegate.- Specified by:
 hasDelegatein interfaceStore<E extends Event,D extends StoreDelegate<E>>- Returns:
 - true if delegate is set
 
 
- 
notifyDelegate
protected void notifyDelegate(E event)
Notifies the delegate with the specified event.- Parameters:
 event- event to delegate
 
 - 
 
 -