Class StoreFactoryCacheSession
java.lang.Object
org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession
- All Implemented Interfaces:
StoreFactory
,CachedStoreFactoryProvider
,Provider
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
protected class
protected class
protected class
protected class
-
Field Summary
Modifier and TypeFieldDescriptionprotected StoreFactoryCacheManager
protected boolean
protected StoreFactory
protected Set<InvalidationEvent>
protected static final org.jboss.logging.Logger
protected Map<String,
PermissionTicketAdapter> protected Map<String,
PolicyAdapter> protected Map<String,
ResourceAdapter> protected Map<String,
ResourceServerAdapter> protected Map<String,
ScopeAdapter> protected StoreFactoryCacheSession.PolicyCache
protected StoreFactoryCacheSession.ResourceCache
protected StoreFactoryCacheSession.ScopeCache
protected KeycloakSession
protected boolean
protected final long
protected boolean
-
Constructor Summary
ConstructorDescriptionStoreFactoryCacheSession
(StoreFactoryCacheManager cache, KeycloakSession session) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static String
getPermissionTicketByGranted
(String userId, String serverId) static String
getPermissionTicketByOwner
(String owner, String serverId) static String
getPermissionTicketByResource
(String resourceId, String serverId) static String
getPermissionTicketByResourceNameAndGranted
(String resourceName, String userId, String serverId) static String
getPermissionTicketByScope
(String scopeId, String serverId) Returns aPermissionTicketStore
.static String
getPolicyByNameCacheKey
(String name, String serverId) static String
getPolicyByResource
(String resourceId, String serverId) static String
getPolicyByResourceScope
(String scope, String resourceId, String serverId) static String
getPolicyByResourceType
(String type, String serverId) static String
getPolicyByScope
(String scope, String serverId) Returns aPolicyStore
.static String
getResourceByNameCacheKey
(String name, String ownerId, String serverId) static String
getResourceByOwnerCacheKey
(String owner, String serverId) static String
getResourceByScopeCacheKey
(String scopeId, String serverId) static String
getResourceByTypeCacheKey
(String type, String serverId) static String
getResourceByTypeCacheKey
(String type, String owner, String serverId) static String
getResourceByTypeInstanceCacheKey
(String type, String serverId) static String
getResourceByUriCacheKey
(String uri, String serverId) static String
getResourceServerByClientCacheKey
(String clientId) Returns aResourceServerStore
.Returns aResourceStore
.static String
getScopeByNameCacheKey
(String name, String serverId) Returns aScopeStore
.long
boolean
boolean
Indicates if instances returned from storage are read-only.void
registerPermissionTicketInvalidation
(String id, String owner, String requester, String resource, String resourceName, String scope, String serverId) void
registerPolicyInvalidation
(String id, String name, Set<String> resources, Set<String> scopes, String defaultResourceType, String serverId) void
registerResourceInvalidation
(String id, String name, String type, Set<String> uris, Set<String> scopes, String serverId, String owner) void
void
registerScopeInvalidation
(String id, String name, String serverId) protected void
void
setReadOnly
(boolean readOnly) Sets whether or not changes to instances returned from this factory are supported.
-
Field Details
-
logger
protected static final org.jboss.logging.Logger logger -
cache
-
transactionActive
protected boolean transactionActive -
setRollbackOnly
protected boolean setRollbackOnly -
managedResourceServers
-
managedScopes
-
managedResources
-
managedPolicies
-
managedPermissionTickets
-
invalidations
-
invalidationEvents
-
clearAll
protected boolean clearAll -
startupRevision
protected final long startupRevision -
delegate
-
session
-
resourceServerCache
-
scopeCache
-
resourceCache
-
policyCache
-
permissionTicketCache
-
-
Constructor Details
-
StoreFactoryCacheSession
-
-
Method Details
-
getResourceServerStore
Description copied from interface:StoreFactory
Returns aResourceServerStore
.- Specified by:
getResourceServerStore
in interfaceStoreFactory
- Returns:
- the resource server store
-
getScopeStore
Description copied from interface:StoreFactory
Returns aScopeStore
.- Specified by:
getScopeStore
in interfaceStoreFactory
- Returns:
- the scope store
-
getResourceStore
Description copied from interface:StoreFactory
Returns aResourceStore
.- Specified by:
getResourceStore
in interfaceStoreFactory
- Returns:
- the resource store
-
getPolicyStore
Description copied from interface:StoreFactory
Returns aPolicyStore
.- Specified by:
getPolicyStore
in interfaceStoreFactory
- Returns:
- the policy store
-
getPermissionTicketStore
Description copied from interface:StoreFactory
Returns aPermissionTicketStore
.- Specified by:
getPermissionTicketStore
in interfaceStoreFactory
- Returns:
- the permission ticket store
-
setReadOnly
public void setReadOnly(boolean readOnly) Description copied from interface:StoreFactory
Sets whether or not changes to instances returned from this factory are supported. Once marked as read-only, any attempt to change state will throw anIllegalStateException
.- Specified by:
setReadOnly
in interfaceStoreFactory
- Parameters:
readOnly
- if true, changes are not supported
-
isReadOnly
public boolean isReadOnly()Description copied from interface:StoreFactory
Indicates if instances returned from storage are read-only.- Specified by:
isReadOnly
in interfaceStoreFactory
- Returns:
- if true, instances only support reads.
-
close
public void close() -
runInvalidations
protected void runInvalidations() -
getStartupRevision
public long getStartupRevision() -
isInvalid
-
registerResourceServerInvalidation
-
registerScopeInvalidation
-
registerResourceInvalidation
-
registerPolicyInvalidation
-
registerPermissionTicketInvalidation
-
getResourceServerStoreDelegate
-
getScopeStoreDelegate
-
getResourceStoreDelegate
-
getPolicyStoreDelegate
-
getPermissionTicketStoreDelegate
-
getResourceServerByClientCacheKey
-
getScopeByNameCacheKey
-
getResourceByNameCacheKey
-
getResourceByOwnerCacheKey
-
getResourceByTypeCacheKey
-
getResourceByTypeCacheKey
-
getResourceByTypeInstanceCacheKey
-
getResourceByUriCacheKey
-
getResourceByScopeCacheKey
-
getPolicyByNameCacheKey
-
getPolicyByResource
-
getPolicyByResourceType
-
getPolicyByScope
-
getPolicyByResourceScope
-
getPermissionTicketByResource
-
getPermissionTicketByScope
-
getPermissionTicketByGranted
-
getPermissionTicketByResourceNameAndGranted
-
getPermissionTicketByOwner
-
getDelegate
-