Class Cache<ApiType extends KubernetesObject>
java.lang.Object
io.micronaut.kubernetes.client.openapi.informer.cache.Cache<ApiType>
- Type Parameters:
ApiType- kubernetes api type
@Internal
public final class Cache<ApiType extends KubernetesObject>
extends Object
implements Indexer<ApiType>
Cache is a java port of k/client-go's ThreadSafeStore. It basically saves and indexes all the entries.
The code has been copied from the official client and modified: Cache
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInserts an item into the store.Returns a list of objects by index name and index key.voidRemoves an item from the store.Returns the request item with specific key.Return the indexers registered with the store.Returns a function which creates an object key.Returns a list of object keys by index name and index key.list()Returns a list of all the items.listKeys()Returns a list of keys of all objects that are currently in the store.voidReplace the content in the cache completely.voidSets an item in the store to its updated state.
-
Field Details
-
DEFAULT_INDEX_NAME
- See Also:
-
DEFAULT_GLOBAL_INDEX_KEY
- See Also:
-
-
Constructor Details
-
Cache
public Cache() -
Cache
-
Cache
-
Cache
-
-
Method Details
-
getKeyFunction
Description copied from interface:StoreReturns a function which creates an object key.- Specified by:
getKeyFunctionin interfaceStore<ApiType extends KubernetesObject>- Returns:
- function which creates an object key
-
add
-
update
-
delete
-
replace
-
listKeys
-
list
-
getByKey
-
indexKeys
Description copied from interface:IndexerReturns a list of object keys by index name and index key.- Specified by:
indexKeysin interfaceIndexer<ApiType extends KubernetesObject>- Parameters:
indexName- the index nameindexKey- the index key- Returns:
- the list of kubernetes object keys
-
byIndex
Description copied from interface:IndexerReturns a list of objects by index name and index key.- Specified by:
byIndexin interfaceIndexer<ApiType extends KubernetesObject>- Parameters:
indexName- the index nameindexKey- the index key- Returns:
- the list of kubernetes objects
-
getIndexers
-