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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    destroy(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey key)
    Destroys the contextual storage associated with the given context key.
    protected void
    Destroys all existing contextual storages.
    getContextualStorage(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey key, boolean createIfNotExist)
    Gets the ContextualStorage associated with the given context key, possibly creating a new instance, if requested and not already existing.
    protected Set<com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey>
    Gets context keys of all registered contextual storages.
    newContextualStorage(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey key)
    Creates a new ContextualStorage for the given context key.
    protected void
    relocate(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey from, com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey to)
    Changes the context key for a contextual storage.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ContextualStorageManager

      public ContextualStorageManager()
  • Method Details

    • 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(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey 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(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey from, com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey 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(com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey key)
      Destroys the contextual storage associated with the given context key.
      Parameters:
      key - the context key
    • getKeySet

      protected Set<com.vaadin.quarkus.context.RouteScopedContext.RouteStorageKey> getKeySet()
      Gets context keys of all registered contextual storages.
      Returns:
      immutable set of context keys.