public class ProcessorStore<T extends io.fabric8.kubernetes.api.model.HasMetadata> extends Object implements SyncableStore<T>
Cache and a SharedProcessor to distribute events related to changes and syncs| Constructor and Description |
|---|
ProcessorStore(Cache<T> cache,
SharedProcessor<T> processor) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T obj)
Inserts an item into the store
|
void |
delete(T obj)
Removes an item from the store
|
T |
get(T object)
Returns the requested item.
|
T |
getByKey(String key)
Returns the request item with specific key.
|
String |
getKey(T obj)
Get the key for the given object
|
List<T> |
list()
Returns a list of all the items.
|
List<String> |
listKeys()
returns a list of all keys of the object currently in the store.
|
void |
resync()
Sends a resync event for each item.
|
void |
retainAll(Set<String> nextKeys)
Retain only the values with keys in the given set
|
void |
update(T obj)
Sets an item in the store to its updated state.
|
public ProcessorStore(Cache<T> cache, SharedProcessor<T> processor)
public void add(T obj)
SyncableStoreadd in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>obj - objectpublic void update(T obj)
SyncableStoreupdate in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>obj - objectpublic void delete(T obj)
SyncableStoredelete in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>obj - objectpublic List<T> list()
Storepublic List<String> listKeys()
Storepublic T getByKey(String key)
Storepublic void retainAll(Set<String> nextKeys)
SyncableStoreretainAll in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>nextKeys - to retainpublic String getKey(T obj)
SyncableStoregetKey in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>obj - objectpublic void resync()
SyncableStoreresync in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>Copyright © 2015–2022 Red Hat. All rights reserved.