Class ConcurrentHashMapBeanStore

java.lang.Object
org.jboss.weld.contexts.beanstore.AbstractMapBackedBeanStore
org.jboss.weld.contexts.beanstore.ConcurrentHashMapBeanStore
All Implemented Interfaces:
Serializable, Iterable<org.jboss.weld.serialization.spi.BeanIdentifier>, BeanStore

public class ConcurrentHashMapBeanStore extends AbstractMapBackedBeanStore implements Serializable
A BeanStore that uses a HashMap as backing storage
Author:
Nicklas Karlsson
See Also:
  • Field Details

    • delegate

      protected Map<org.jboss.weld.serialization.spi.BeanIdentifier,Object> delegate
  • Constructor Details

    • ConcurrentHashMapBeanStore

      public ConcurrentHashMapBeanStore()
      Constructor
  • Method Details

    • delegate

      public Map<org.jboss.weld.serialization.spi.BeanIdentifier,Object> delegate()
      Gets the delegate for the store
      Specified by:
      delegate in class AbstractMapBackedBeanStore
      Returns:
      The delegate
    • toString

      public String toString()
      Overrides:
      toString in class AbstractMapBackedBeanStore
    • lock

      public LockedBean lock(org.jboss.weld.serialization.spi.BeanIdentifier id)
      Description copied from interface: BeanStore
      Gets a creation lock for the given bean id.
      Specified by:
      lock in interface BeanStore
      Parameters:
      id - The bean id
      Returns:
      A handle that must be used to unlock the bean