Class DefaultPermissionQueryCache

java.lang.Object
com.atlassian.jira.issue.search.util.DefaultPermissionQueryCache
All Implemented Interfaces:
PermissionQueryCache

@Deprecated(since="10.4", forRemoval=true) public class DefaultPermissionQueryCache extends Object implements PermissionQueryCache
Deprecated, for removal: This API element is subject to removal in a future version.
since 10.4. To be removed when PermissionQueryCache is removed.
Cache for holding precomputed JQL permission query filter. See JRASERVER-14980. In current implementation second call to getPermissionQuery causes permission filter to be precomputed and cached in CachingWrapperFilter which gives us an extra benefit of precalculating its BitSet. Caching can be disabled:
  • globally by disabling RequestCacheKeys.WRAP_PERMISSION_FILTER_IN_CACHED_WRAPPER_CACHE feature flag
  • per request by using disableCacheForRequest()
  • Constructor Details

    • DefaultPermissionQueryCache

      public DefaultPermissionQueryCache(PermissionsFilterGenerator permissionsFilterGenerator)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getPermissionQuery

      public Optional<org.apache.lucene.search.Query> getPermissionQuery(ApplicationUser searchUser)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PermissionQueryCache
      Gets permission cache for passed searchUser.
      Specified by:
      getPermissionQuery in interface PermissionQueryCache
      Parameters:
      searchUser - Application user
      Returns:
      Optional with cached permission filter or Optional.empty() if cache is turned off (either by feature flag or for request) or not applicable for this request (eq. only second and following calls could be cached).
    • getPermissionQuery

      public Optional<org.apache.lucene.search.Query> getPermissionQuery(ApplicationUser searchUser, @Nullable Collection<Project> projects)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PermissionQueryCache
      Gets permission cache for passed searchUser in given projects.
      Specified by:
      getPermissionQuery in interface PermissionQueryCache
      Parameters:
      searchUser - Application user
      projects - List of projects
      Returns:
      Optional with cached permission filter or Optional.empty() if cache is turned off (either by feature flag or for request) or not applicable for this request (eq. only second and following calls could be cached).
    • disableCacheForRequest

      public void disableCacheForRequest()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PermissionQueryCache
      Disables cache usage for this http request.
      Specified by:
      disableCacheForRequest in interface PermissionQueryCache