Interface BeanStore

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Clears the store of contextual instances
      boolean contains​(org.jboss.weld.serialization.spi.BeanIdentifier id)
      Check if the store contains an instance
      <T> org.jboss.weld.context.api.ContextualInstance<T> get​(org.jboss.weld.serialization.spi.BeanIdentifier id)
      Gets an instance of a contextual from the store
      Iterator<org.jboss.weld.serialization.spi.BeanIdentifier> iterator()  
      LockedBean lock​(org.jboss.weld.serialization.spi.BeanIdentifier id)
      Gets a creation lock for the given bean id.
      <T> void put​(org.jboss.weld.serialization.spi.BeanIdentifier id, org.jboss.weld.context.api.ContextualInstance<T> contextualInstance)
      Adds a bean instance to the storage
      <T> org.jboss.weld.context.api.ContextualInstance<T> remove​(org.jboss.weld.serialization.spi.BeanIdentifier id)
      Removes a bean instance identified by the given id.
    • Method Detail

      • get

        <T> org.jboss.weld.context.api.ContextualInstance<T> get​(org.jboss.weld.serialization.spi.BeanIdentifier id)
        Gets an instance of a contextual from the store
        Parameters:
        id - The id of the contextual to return
        Returns:
        The instance or null if not found
      • contains

        boolean contains​(org.jboss.weld.serialization.spi.BeanIdentifier id)
        Check if the store contains an instance
        Parameters:
        id - the id of the instance to check for
        Returns:
        true if the instance is present, otherwise false
      • clear

        void clear()
        Clears the store of contextual instances
      • iterator

        Iterator<org.jboss.weld.serialization.spi.BeanIdentifier> iterator()
        Specified by:
        iterator in interface Iterable<org.jboss.weld.serialization.spi.BeanIdentifier>
      • put

        <T> void put​(org.jboss.weld.serialization.spi.BeanIdentifier id,
                     org.jboss.weld.context.api.ContextualInstance<T> contextualInstance)
        Adds a bean instance to the storage
        Parameters:
        contextualInstance - the contextual instance
      • lock

        LockedBean lock​(org.jboss.weld.serialization.spi.BeanIdentifier id)
        Gets a creation lock for the given bean id.
        Parameters:
        id - The bean id
        Returns:
        A handle that must be used to unlock the bean
      • remove

        <T> org.jboss.weld.context.api.ContextualInstance<T> remove​(org.jboss.weld.serialization.spi.BeanIdentifier id)
        Removes a bean instance identified by the given id.
        Parameters:
        id - The bean id
        Returns:
        the removed bean instance of null if there was no bean instance before