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.
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_CACHEfeature flag - per request by using
disableCacheForRequest()
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPermissionQueryCache(PermissionsFilterGenerator permissionsFilterGenerator) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Disables cache usage for this http request.Optional<org.apache.lucene.search.Query> getPermissionQuery(ApplicationUser searchUser) Deprecated, for removal: This API element is subject to removal in a future version.Gets permission cache for passedsearchUser.Optional<org.apache.lucene.search.Query> getPermissionQuery(ApplicationUser searchUser, Collection<Project> projects) Deprecated, for removal: This API element is subject to removal in a future version.Gets permission cache for passedsearchUserin givenprojects.
-
Constructor Details
-
DefaultPermissionQueryCache
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getPermissionQuery
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PermissionQueryCacheGets permission cache for passedsearchUser.- Specified by:
getPermissionQueryin interfacePermissionQueryCache- Parameters:
searchUser- Application user- Returns:
Optionalwith cached permission filter orOptional.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:PermissionQueryCacheGets permission cache for passedsearchUserin givenprojects.- Specified by:
getPermissionQueryin interfacePermissionQueryCache- Parameters:
searchUser- Application userprojects- List of projects- Returns:
Optionalwith cached permission filter orOptional.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:PermissionQueryCacheDisables cache usage for this http request.- Specified by:
disableCacheForRequestin interfacePermissionQueryCache
-
PermissionQueryCacheis removed.