Package org.gridgain.internal.rbac.store
Class StoreCache<T>
java.lang.Object
org.gridgain.internal.rbac.store.StoreCache<T>
- Type Parameters:
T- Type of cached entry.
Thread-safe volatile cache for
Store read operations.
Maintains a volatile map that can be atomically replaced via update(org.apache.ignite.configuration.NamedListView<V>, java.util.function.Function<V, T>).
Read operations are lock-free.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(Collection<LowerCaseString> keys) Returns cached values by keys;nullentries for missing keys.get(LowerCaseString key) Returns cached value by key, ornullif not found.getAll()Returns all cached values.Returns the full cache map.<V> voidRebuilds the cache from aNamedListView.
-
Constructor Details
-
StoreCache
public StoreCache()
-
-
Method Details
-
update
public <V> void update(@Nullable @Nullable org.apache.ignite.configuration.NamedListView<V> list, Function<V, T> converter) Rebuilds the cache from aNamedListView.Keys are taken from
NamedListView.namedListKeys()(the storage key passed to create/put), not from displayName which may differ.- Type Parameters:
V- View entry type.- Parameters:
list- Named list view, ornullfor an empty cache.converter- Converts a view entry to a cached value.
-
getAll
Returns all cached values. -
getAllWithKeys
Returns the full cache map. -
get
Returns cached value by key, ornullif not found. -
get
Returns cached values by keys;nullentries for missing keys.
-