Interface Store<ApiType>
- Type Parameters:
ApiType
- kubernetes api type
- All Known Subinterfaces:
Indexer<ApiType>
- All Known Implementing Classes:
Cache
public interface Store<ApiType>
Interface for implementations which stores objects.
The code has been copied from the official client and modified: Store
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Inserts an item into the store.void
Removes an item from the store.Returns the request item with specific key.Returns a function which creates an object key.list()
Returns a list of all the items.listKeys()
Returns a list of keys of all objects that are currently in the store.void
Replace the content in the cache completely.void
Sets an item in the store to its updated state.
-
Method Details
-
getKeyFunction
Returns a function which creates an object key.- Returns:
- function which creates an object key
-
add
Inserts an item into the store.- Parameters:
obj
- specific obj
-
update
Sets an item in the store to its updated state.- Parameters:
obj
- specific obj
-
delete
Removes an item from the store.- Parameters:
obj
- specific obj
-
replace
Replace the content in the cache completely.- Parameters:
objects
- list of kubernetes objects
-
listKeys
Returns a list of keys of all objects that are currently in the store.- Returns:
- list of all keys
-
getByKey
Returns the request item with specific key.- Parameters:
key
- specific key- Returns:
- the request item
-
list
Returns a list of all the items.- Returns:
- list of all the items
-