Class ContextualStorage

    • Field Detail

      • beanManager

        protected jakarta.enterprise.inject.spi.BeanManager beanManager
      • concurrent

        protected boolean concurrent
      • activated

        protected transient volatile boolean activated
    • Constructor Detail

      • ContextualStorage

        public ContextualStorage()
      • ContextualStorage

        public ContextualStorage​(jakarta.enterprise.inject.spi.BeanManager beanManager,
                                 boolean concurrent)
        Parameters:
        beanManager - is needed for serialisation
        concurrent - whether the ContextualStorage might get accessed concurrently by different threads
    • Method Detail

      • isConcurrent

        public boolean isConcurrent()
        Returns:
        whether the ContextualStorage might get accessed concurrently by different threads.
      • createContextualInstance

        public <T> T createContextualInstance​(jakarta.enterprise.context.spi.Contextual<T> bean,
                                              jakarta.enterprise.context.spi.CreationalContext<T> creationalContext)
        Type Parameters:
        T -
        Parameters:
        bean -
        creationalContext -
        Returns:
      • getBeanKey

        public <T> Object getBeanKey​(jakarta.enterprise.context.spi.Contextual<T> bean)
        If the context is a passivating scope then we return the passivationId of the Bean. Otherwise we use the Bean directly.
        Parameters:
        bean -
        Returns:
        the key to use in the context map
      • isActivated

        public boolean isActivated()
      • activate

        public void activate()
      • deactivate

        public void deactivate()