public class DeltaFIFO<T> extends Object implements Store<Object>
Modifier and Type | Class and Description |
---|---|
static class |
DeltaFIFO.DeletedFinalStateUnknown<T>
DeletedFinalStateUnknown is placed into a DeltaFIFO in the case where
an object was deleted but the watch deletion event was missed.
|
static class |
DeltaFIFO.DeltaType |
Constructor and Description |
---|
DeltaFIFO(Function<T,String> keyFunc,
Store knownObjects) |
Modifier and Type | Method and Description |
---|---|
void |
add(Object obj)
Add items to the delta FIFO.
|
void |
delete(Object obj)
Delete items from the delta FIFO
|
Object |
get(Object obj)
Get object
|
Deque<AbstractMap.SimpleEntry<DeltaFIFO.DeltaType,Object>> |
getByKey(String key)
Gets by key
|
boolean |
hasSynced()
Has synced boolean
|
void |
isPopulated(boolean isPopulated)
Updates the status of cache in case of any API error from Kubernetes server
|
List<Object> |
list()
List objects
|
List<String> |
listKeys()
List keys list.
|
Deque<AbstractMap.SimpleEntry<DeltaFIFO.DeltaType,Object>> |
pop(Consumer<Deque<AbstractMap.SimpleEntry<DeltaFIFO.DeltaType,Object>>> func)
Pop Deltas
|
void |
replace(List list,
String resourceVersion)
Replace the item forcibly.
|
void |
resync()
Resync the delta FIFO.
|
void |
update(Object obj)
Update items in delta FIFO
|
public void add(Object obj)
public void update(Object obj)
public void delete(Object obj)
public void resync()
public Deque<AbstractMap.SimpleEntry<DeltaFIFO.DeltaType,Object>> getByKey(String key)
public Deque<AbstractMap.SimpleEntry<DeltaFIFO.DeltaType,Object>> pop(Consumer<Deque<AbstractMap.SimpleEntry<DeltaFIFO.DeltaType,Object>>> func) throws InterruptedException
func
- the funcInterruptedException
- interruption exceptionpublic boolean hasSynced()
public void isPopulated(boolean isPopulated)
Store
isPopulated
in interface Store<Object>
isPopulated
- boolean value indicating whether cache is populated or notCopyright © 2015–2020 Red Hat. All rights reserved.