Class RouteScopedContext.ContextualStorageManager

    • Constructor Detail

      • ContextualStorageManager

        public ContextualStorageManager()
    • Method Detail

      • newContextualStorage

        protected ContextualStorage newContextualStorage​(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey key)
        Creates a new ContextualStorage for the given context key.
        Parameters:
        key - the context key
        Returns:
        a new ContextualStorage instance.
      • getContextualStorage

        protected ContextualStorage getContextualStorage​(K key,
                                                         boolean createIfNotExist)
        Gets the ContextualStorage associated with the given context key, possibly creating a new instance, if requested and not already existing.
        Parameters:
        key - context key
        createIfNotExist - whether a ContextualStorage shall get created if it doesn't yet exist.
        Returns:
        a ContextualStorage instance.
      • relocate

        protected void relocate​(K from,
                                K to)
        Changes the context key for a contextual storage.
        Parameters:
        from - the contextual storage context key
        to - 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.