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.
|
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 |
replace(List<T> list)
Deletes the contents of the store, using instead the given list.
|
void |
resync()
Sends a resync event for each item.
|
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 replace(List<T> list)
SyncableStorereplace in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>list - list of objectspublic void resync()
SyncableStoreresync in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>Copyright © 2015–2020 Red Hat. All rights reserved.