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 syncsConstructor 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)
SyncableStore
add
in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>
obj
- objectpublic void update(T obj)
SyncableStore
update
in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>
obj
- objectpublic void delete(T obj)
SyncableStore
delete
in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>
obj
- objectpublic List<T> list()
Store
public List<String> listKeys()
Store
public T getByKey(String key)
Store
public void retainAll(Set<String> nextKeys)
SyncableStore
retainAll
in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>
nextKeys
- to retainpublic String getKey(T obj)
SyncableStore
getKey
in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>
obj
- objectpublic void resync()
SyncableStore
resync
in interface SyncableStore<T extends io.fabric8.kubernetes.api.model.HasMetadata>
Copyright © 2015–2022 Red Hat. All rights reserved.