Class ReentrantRequestCacheContext
java.lang.Object
com.atlassian.jira.cache.request.context.ReentrantRequestCacheContext
- All Implemented Interfaces:
RequestCacheContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearAll()Clears all local storage for this thread.voidclearLocalMap(RequestCache<?, ?> requestCache) Clears a specific request cache's local storage for this thread.voidclose()Decrements the nesting depth for this cache context, or closes and destroys the current context if the nesting depth was already0(meaning that this matches the outermost opening of the context).getLocalMap(RequestCache<?, ?> requestCache) Returns the request-scoped storage for the given request cache.getLocalMapIfExists(RequestCache<?, ?> requestCache) Returns the request-scoped storage for the given request cache, if it exists.voidMark the success of adding the value to map returned byRequestCacheContext.getLocalMap(RequestCache)orRequestCacheContext.getLocalMapIfExists(RequestCache)voidopen()Increments the nesting depth for this cache context.
-
Constructor Details
-
ReentrantRequestCacheContext
-
-
Method Details
-
getLocalMap
Description copied from interface:RequestCacheContextReturns the request-scoped storage for the given request cache. If that storage does not already exist, then one is created.- Specified by:
getLocalMapin interfaceRequestCacheContext- Parameters:
requestCache- the cache for which to locate- Returns:
- the local storage corresponding to the given request cache
-
getLocalMapIfExists
Description copied from interface:RequestCacheContextReturns the request-scoped storage for the given request cache, if it exists.- Specified by:
getLocalMapIfExistsin interfaceRequestCacheContext- 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:RequestCacheContextClears all local storage for this thread. Any request caches that belong to other threads are not affected by this.- Specified by:
clearAllin interfaceRequestCacheContext
-
clearLocalMap
Description copied from interface:RequestCacheContextClears 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:
clearLocalMapin interfaceRequestCacheContext- 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:
openin interfaceRequestCacheContext
-
close
public void close()Decrements the nesting depth for this cache context, or closes and destroys the current context if the nesting depth was already0(meaning that this matches the outermost opening of the context).- Specified by:
closein interfaceRequestCacheContext
-
markValueLoading
public void markValueLoading()Description copied from interface:RequestCacheContextMark the success of adding the value to map returned byRequestCacheContext.getLocalMap(RequestCache)orRequestCacheContext.getLocalMapIfExists(RequestCache)- Specified by:
markValueLoadingin interfaceRequestCacheContext
-