Class ReentrantRequestCacheContext

java.lang.Object
com.atlassian.jira.cache.request.context.ReentrantRequestCacheContext
All Implemented Interfaces:
RequestCacheContext

public class ReentrantRequestCacheContext extends Object implements RequestCacheContext
  • Constructor Details

    • ReentrantRequestCacheContext

      public ReentrantRequestCacheContext(RequestCacheContext delegate)
  • Method Details

    • getLocalMap

      @Nonnull public Map<Object,Object> getLocalMap(RequestCache<?,?> requestCache)
      Description copied from interface: RequestCacheContext
      Returns the request-scoped storage for the given request cache. If that storage does not already exist, then one is created.
      Specified by:
      getLocalMap in interface RequestCacheContext
      Parameters:
      requestCache - the cache for which to locate
      Returns:
      the local storage corresponding to the given request cache
    • getLocalMapIfExists

      @Nullable public Map<Object,Object> getLocalMapIfExists(RequestCache<?,?> requestCache)
      Description copied from interface: RequestCacheContext
      Returns the request-scoped storage for the given request cache, if it exists.
      Specified by:
      getLocalMapIfExists in interface RequestCacheContext
      Parameters:
      requestCache - the cache for which to locate
      Returns:
      the local storage corresponding to the given request cache, if it already exists; otherwise null.
    • clearAll

      public void clearAll()
      Description copied from interface: RequestCacheContext
      Clears all local storage for this thread. Any request caches that belong to other threads are not affected by this.
      Specified by:
      clearAll in interface RequestCacheContext
    • clearLocalMap

      public void clearLocalMap(RequestCache<?,?> requestCache)
      Description copied from interface: RequestCacheContext
      Clears a specific request cache's local storage for this thread. Any request caches that belong to other threads are not affected by this.
      Specified by:
      clearLocalMap in interface RequestCacheContext
      Parameters:
      requestCache - the cache for which to clear the current thread's local storage
    • open

      public void open()
      Increments the nesting depth for this cache context.
      Specified by:
      open in interface RequestCacheContext
    • close

      public void close()
      Decrements the nesting depth for this cache context, or closes and destroys the current context if the nesting depth was already 0 (meaning that this matches the outermost opening of the context).
      Specified by:
      close in interface RequestCacheContext
    • markValueLoading

      public void markValueLoading()
      Description copied from interface: RequestCacheContext
      Specified by:
      markValueLoading in interface RequestCacheContext