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
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected classprotected classprotected class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StoreFactoryCacheManagerprotected StoreFactoryprotected Set<InvalidationEvent>protected static final org.jboss.logging.Loggerprotected Map<String,PermissionTicketAdapter> protected Map<String,PolicyAdapter> protected Map<String,ResourceAdapter> protected Map<String,ResourceServerAdapter> protected Map<String,ScopeAdapter> protected StoreFactoryCacheSession.PolicyCacheprotected StoreFactoryCacheSession.ResourceCacheprotected StoreFactoryCacheSession.ScopeCacheprotected KeycloakSessionprotected booleanprotected final longprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionStoreFactoryCacheSession(StoreFactoryCacheManager cache, KeycloakSession session) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static StringgetPermissionTicketByGranted(String userId, String serverId) static StringgetPermissionTicketByOwner(String owner, String serverId) static StringgetPermissionTicketByResource(String resourceId, String serverId) static StringgetPermissionTicketByResourceNameAndGranted(String resourceName, String userId, String serverId) static StringgetPermissionTicketByScope(String scopeId, String serverId) Returns aPermissionTicketStore.static StringgetPolicyByNameCacheKey(String name, String serverId) static StringgetPolicyByResource(String resourceId, String serverId) static StringgetPolicyByResourceScope(String scope, String resourceId, String serverId) static StringgetPolicyByResourceType(String type, String serverId) static StringgetPolicyByScope(String scope, String serverId) Returns aPolicyStore.static StringgetResourceByNameCacheKey(String name, String ownerId, String serverId) static StringgetResourceByOwnerCacheKey(String owner, String serverId) static StringgetResourceByScopeCacheKey(String scopeId, String serverId) static StringgetResourceByTypeCacheKey(String type, String serverId) static StringgetResourceByTypeCacheKey(String type, String owner, String serverId) static StringgetResourceByTypeInstanceCacheKey(String type, String serverId) static StringgetResourceByUriCacheKey(String uri, String serverId) static StringgetResourceServerByClientCacheKey(String clientId) Returns aResourceServerStore.Returns aResourceStore.static StringgetScopeByNameCacheKey(String name, String serverId) Returns aScopeStore.booleanIndicates if instances returned from storage are read-only.voidregisterPermissionTicketInvalidation(String id, String owner, String requester, String resource, String resourceName, String scope, String serverId) voidregisterPolicyInvalidation(String id, String name, Set<String> resources, Set<String> scopes, String defaultResourceType, String serverId) voidregisterResourceInvalidation(String id, String name, String type, Set<String> uris, Set<String> scopes, String serverId, String owner) voidvoidregisterScopeInvalidation(String id, String name, String serverId) protected voidvoidsetReadOnly(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
-
startupRevision
protected final long startupRevision -
delegate
-
session
-
resourceServerCache
-
scopeCache
-
resourceCache
-
policyCache
-
permissionTicketCache
-
-
Constructor Details
-
StoreFactoryCacheSession
-
-
Method Details
-
getResourceServerStore
Description copied from interface:StoreFactoryReturns aResourceServerStore.- Specified by:
getResourceServerStorein interfaceStoreFactory- Returns:
- the resource server store
-
getScopeStore
Description copied from interface:StoreFactoryReturns aScopeStore.- Specified by:
getScopeStorein interfaceStoreFactory- Returns:
- the scope store
-
getResourceStore
Description copied from interface:StoreFactoryReturns aResourceStore.- Specified by:
getResourceStorein interfaceStoreFactory- Returns:
- the resource store
-
getPolicyStore
Description copied from interface:StoreFactoryReturns aPolicyStore.- Specified by:
getPolicyStorein interfaceStoreFactory- Returns:
- the policy store
-
getPermissionTicketStore
Description copied from interface:StoreFactoryReturns aPermissionTicketStore.- Specified by:
getPermissionTicketStorein interfaceStoreFactory- Returns:
- the permission ticket store
-
setReadOnly
public void setReadOnly(boolean readOnly) Description copied from interface:StoreFactorySets 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:
setReadOnlyin interfaceStoreFactory- Parameters:
readOnly- if true, changes are not supported
-
isReadOnly
public boolean isReadOnly()Description copied from interface:StoreFactoryIndicates if instances returned from storage are read-only.- Specified by:
isReadOnlyin interfaceStoreFactory- Returns:
- if true, instances only support reads.
-
close
public void close() -
runInvalidations
protected void runInvalidations() -
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
-