Package com.vaadin.quarkus.context
Class RouteScopedContext.ContextualStorageManager
- java.lang.Object
-
- com.vaadin.quarkus.context.RouteScopedContext.ContextualStorageManager
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- RouteScopedContext
public abstract static class RouteScopedContext.ContextualStorageManager extends Object
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ContextualStorageManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddestroy(K key)Destroys the contextual storage associated with the given context key.protected voiddestroyAll()Destroys all existing contextual storages.protected ContextualStoragegetContextualStorage(K key, boolean createIfNotExist)Gets theContextualStorageassociated with the given contextkey, possibly creating a new instance, if requested and not already existing.protected Set<K>getKeySet()Gets context keys of all registered contextual storages.protected ContextualStoragenewContextualStorage(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey key)Creates a newContextualStoragefor the given context key.protected voidrelocate(K from, K to)Changes the context key for a contextual storage.
-
-
-
Method Detail
-
newContextualStorage
protected ContextualStorage newContextualStorage(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey key)
Creates a newContextualStoragefor the given context key.- Parameters:
key- the context key- Returns:
- a new
ContextualStorageinstance.
-
getContextualStorage
protected ContextualStorage getContextualStorage(K key, boolean createIfNotExist)
Gets theContextualStorageassociated with the given contextkey, possibly creating a new instance, if requested and not already existing.- Parameters:
key- context keycreateIfNotExist- whether a ContextualStorage shall get created if it doesn't yet exist.- Returns:
- a
ContextualStorageinstance.
-
relocate
protected void relocate(K from, K to)Changes the context key for a contextual storage.- Parameters:
from- the contextual storage context keyto- the new context for the contextual storage
-
destroyAll
@PreDestroy protected void destroyAll()
Destroys all existing contextual storages.
-
destroy
protected void destroy(K key)
Destroys the contextual storage associated with the given context key.- Parameters:
key- the context key
-
getKeySet
protected Set<K> getKeySet()
Gets context keys of all registered contextual storages.- Returns:
- immutable set of context keys.
-
-