Interface ItemStore<V>
-
- Type Parameters:
V-
- All Known Implementing Classes:
BasicItemStore,ReducedStateItemStore
public interface ItemStore<V>Holds item state for theSharedIndexInformer. For events to be consistent the store should remember all entries until they are deleted. At its simplest this is just a map coupled with a key function.Modifications to this store once the informer is running, by anything other than the informer will alter the event stream. If for example an item is not found, an subsequent update from the api version will send notifications to
ResourceEventHandlers as an add.Direct modifications to this store by anything other than the informer will not updated indexes nor emit events.
The implementation should be safe with respect to concurrency. Modifications from the informer will be single threaded, but not necessarily the same thread. Reads may be concurrent with writes.
See an example implementations
BasicItemStoreandReducedStateItemStore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Vget(String key)StringgetKey(V obj)default booleanisFullState()Used to determine if initial add events can be deferred until the entire list operation has completed - when using a limit it may take several batches to complete.Stream<String>keySet()Vput(String key, V obj)Vremove(String key)intsize()Stream<V>values()
-
-
-
Method Detail
-
size
int size()
-
isFullState
default boolean isFullState()
Used to determine if initial add events can be deferred until the entire list operation has completed - when using a limit it may take several batches to complete.
If false, then the initial add events must be processed as they occur - meaning that the store state may not be complete.- Returns:
-
-