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 java.lang.Object implements Store<E,D> Base implementation of a store.
- 
- 
Constructor SummaryConstructors Constructor Description AbstractStore()
 - 
Method SummaryAll 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(java.util.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- 
delegateprotected D extends StoreDelegate<E> delegate 
 
- 
 - 
Method Detail- 
setDelegatepublic void setDelegate(D delegate) Description copied from interface:StoreSets the delegate on the store.- Specified by:
- setDelegatein interface- Store<E extends Event,D extends StoreDelegate<E>>
- Parameters:
- delegate- new store delegate
 
 - 
unsetDelegatepublic void unsetDelegate(D delegate) Description copied from interface:StoreWithdraws the delegate from the store.- Specified by:
- unsetDelegatein interface- Store<E extends Event,D extends StoreDelegate<E>>
- Parameters:
- delegate- store delegate to withdraw
 
 - 
hasDelegatepublic boolean hasDelegate() Description copied from interface:StoreIndicates whether the store has a delegate.- Specified by:
- hasDelegatein interface- Store<E extends Event,D extends StoreDelegate<E>>
- Returns:
- true if delegate is set
 
 - 
notifyDelegateprotected void notifyDelegate(E event) Notifies the delegate with the specified event.- Parameters:
- event- event to delegate
 
 - 
notifyDelegateprotected void notifyDelegate(java.util.List<E> events) Notifies the delegate with the specified list of events.- Parameters:
- events- list of events to delegate
 
 
- 
 
-