Class UnSharedContext<K>

    • Constructor Detail

      • UnSharedContext

        public UnSharedContext()
    • Method Detail

      • deactivate

        public void deactivate​(K key)
        Deactivates the current context using the given key from the context of the thread
        Specified by:
        deactivate in interface AdvancedContext<K>
        Overrides:
        deactivate in class AbstractContext<K>
        Parameters:
        key - the key to use to deactivate the context
      • isSharable

        protected final boolean isSharable()
        Indicates whether the objects of the context that can shared or not. sharable
        Specified by:
        isSharable in class AbstractContext<K>
        Returns:
        true if the components are sharable, false otherwise.
      • getLock

        protected final Lock getLock​(String id)
        In case the context is sharable, we will need a lock to synchronize the accesses
        Specified by:
        getLock in class AbstractContext<K>
        Parameters:
        id - the id of the contextual for which we want a lock
        Returns:
        a lock corresponding to the given contextual within the current context