keycloak
公開メンバ関数 | 全メンバ一覧
org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache クラス
org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache の継承関係図
Inheritance graph
org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache 連携図
Collaboration graph

公開メンバ関数

Scope create (String name, ResourceServer resourceServer)
 
Scope create (String id, String name, ResourceServer resourceServer)
 
void delete (String id)
 
Scope findById (String id, String resourceServerId)
 
Scope findByName (String name, String resourceServerId)
 
List< ScopefindByResourceServer (String id)
 
List< ScopefindByResourceServer (Map< String, String[]> attributes, String resourceServerId, int firstResult, int maxResult)
 

詳解

関数詳解

◆ create() [1/2]

Scope org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache.create ( String  name,
ResourceServer  resourceServer 
)
inline

org.keycloak.authorization.store.ScopeStoreを実装しています。

470  {
471  return create(null, name, resourceServer);
472  }
Scope create(String name, ResourceServer resourceServer)
Definition: StoreFactoryCacheSession.java:470

◆ create() [2/2]

Scope org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache.create ( String  id,
String  name,
ResourceServer  resourceServer 
)
inline

org.keycloak.authorization.store.ScopeStoreを実装しています。

475  {
476  Scope scope = getScopeStoreDelegate().create(id, name, resourceServer);
477  registerScopeInvalidation(scope.getId(), scope.getName(), resourceServer.getId());
478  return scope;
479  }
Scope create(String name, ResourceServer resourceServer)
void registerScopeInvalidation(String id, String name, String serverId)
Definition: StoreFactoryCacheSession.java:261
ScopeStore getScopeStoreDelegate()
Definition: StoreFactoryCacheSession.java:318

◆ delete()

void org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache.delete ( String  id)
inline

org.keycloak.authorization.store.ScopeStoreを実装しています。

482  {
483  if (id == null) return;
484  Scope scope = findById(id, null);
485  if (scope == null) return;
486 
488  invalidationEvents.add(ScopeRemovedEvent.create(id, scope.getName(), scope.getResourceServer().getId()));
489  cache.scopeRemoval(id, scope.getName(), scope.getResourceServer().getId(), invalidations);
491  }
Set< String > invalidations
Definition: StoreFactoryCacheSession.java:98
Set< InvalidationEvent > invalidationEvents
Definition: StoreFactoryCacheSession.java:99
Object invalidateObject(String id)
Definition: CacheManager.java:116
Scope findById(String id, String resourceServerId)
Definition: StoreFactoryCacheSession.java:494
StoreFactoryCacheManager cache
Definition: StoreFactoryCacheSession.java:89
ScopeStore getScopeStoreDelegate()
Definition: StoreFactoryCacheSession.java:318
void scopeRemoval(String id, String name, String serverId, Set< String > invalidations)
Definition: StoreFactoryCacheManager.java:75

◆ findById()

Scope org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache.findById ( String  id,
String  resourceServerId 
)
inline

org.keycloak.authorization.store.ScopeStoreを実装しています。

494  {
495  if (id == null) return null;
496  CachedScope cached = cache.get(id, CachedScope.class);
497  if (cached != null) {
498  logger.tracev("by id cache hit: {0}", cached.getId());
499  }
500  if (cached == null) {
501  Long loaded = cache.getCurrentRevision(id);
502  if (! modelMightExist(id)) return null;
503  Scope model = getScopeStoreDelegate().findById(id, resourceServerId);
504  if (model == null) {
505  setModelDoesNotExists(id, loaded);
506  return null;
507  }
508  if (invalidations.contains(id)) return model;
509  cached = new CachedScope(loaded, model);
511  } else if (invalidations.contains(id)) {
512  return getScopeStoreDelegate().findById(id, resourceServerId);
513  } else if (managedScopes.containsKey(id)) {
514  return managedScopes.get(id);
515  }
516  ScopeAdapter adapter = new ScopeAdapter(cached, StoreFactoryCacheSession.this);
517  managedScopes.put(id, adapter);
518  return adapter;
519  }
Long getCurrentRevision(String id)
Definition: CacheManager.java:77
boolean modelMightExist(String id)
Definition: StoreFactoryCacheSession.java:410
Set< String > invalidations
Definition: StoreFactoryCacheSession.java:98
void setModelDoesNotExists(String id, Long loaded)
Definition: StoreFactoryCacheSession.java:404
public< T extends Revisioned > T get(String id, Class< T > type)
Definition: CacheManager.java:94
StoreFactoryCacheSession(StoreFactoryCacheManager cache, KeycloakSession session)
Definition: StoreFactoryCacheSession.java:111
Scope findById(String id, String resourceServerId)
Map< String, ScopeAdapter > managedScopes
Definition: StoreFactoryCacheSession.java:94
StoreFactoryCacheManager cache
Definition: StoreFactoryCacheSession.java:89
void addRevisioned(Revisioned object, long startupRevision)
Definition: CacheManager.java:132
static final Logger logger
Definition: StoreFactoryCacheSession.java:87
ScopeStore getScopeStoreDelegate()
Definition: StoreFactoryCacheSession.java:318
final long startupRevision
Definition: StoreFactoryCacheSession.java:102

◆ findByName()

Scope org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache.findByName ( String  name,
String  resourceServerId 
)
inline

org.keycloak.authorization.store.ScopeStoreを実装しています。

522  {
523  if (name == null) return null;
524  String cacheKey = getScopeByNameCacheKey(name, resourceServerId);
525  ScopeListQuery query = cache.get(cacheKey, ScopeListQuery.class);
526  if (query != null) {
527  logger.tracev("scope by name cache hit: {0}", name);
528  }
529  if (query == null) {
530  Long loaded = cache.getCurrentRevision(cacheKey);
531  Scope model = getScopeStoreDelegate().findByName(name, resourceServerId);
532  if (model == null) return null;
533  if (invalidations.contains(model.getId())) return model;
534  query = new ScopeListQuery(loaded, cacheKey, model.getId(), resourceServerId);
536  return model;
537  } else if (invalidations.contains(cacheKey)) {
538  return getScopeStoreDelegate().findByName(name, resourceServerId);
539  } else {
540  String id = query.getScopes().iterator().next();
541  if (invalidations.contains(id)) {
542  return getScopeStoreDelegate().findByName(name, resourceServerId);
543  }
544  return findById(id, query.getResourceServerId());
545  }
546  }
Long getCurrentRevision(String id)
Definition: CacheManager.java:77
Set< String > invalidations
Definition: StoreFactoryCacheSession.java:98
static String getScopeByNameCacheKey(String name, String serverId)
Definition: StoreFactoryCacheSession.java:338
Scope findByName(String name, String resourceServerId)
public< T extends Revisioned > T get(String id, Class< T > type)
Definition: CacheManager.java:94
Scope findById(String id, String resourceServerId)
Definition: StoreFactoryCacheSession.java:494
StoreFactoryCacheManager cache
Definition: StoreFactoryCacheSession.java:89
void addRevisioned(Revisioned object, long startupRevision)
Definition: CacheManager.java:132
static final Logger logger
Definition: StoreFactoryCacheSession.java:87
ScopeStore getScopeStoreDelegate()
Definition: StoreFactoryCacheSession.java:318
final long startupRevision
Definition: StoreFactoryCacheSession.java:102

◆ findByResourceServer() [1/2]

List<Scope> org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache.findByResourceServer ( String  id)
inline

org.keycloak.authorization.store.ScopeStoreを実装しています。

549  {
551  }
List< Scope > findByResourceServer(String id)
ScopeStore getScopeStoreDelegate()
Definition: StoreFactoryCacheSession.java:318

◆ findByResourceServer() [2/2]

List<Scope> org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession.ScopeCache.findByResourceServer ( Map< String, String[]>  attributes,
String  resourceServerId,
int  firstResult,
int  maxResult 
)
inline

org.keycloak.authorization.store.ScopeStoreを実装しています。

554  {
555  return getScopeStoreDelegate().findByResourceServer(attributes, resourceServerId, firstResult, maxResult);
556  }
List< Scope > findByResourceServer(String id)
ScopeStore getScopeStoreDelegate()
Definition: StoreFactoryCacheSession.java:318

このクラス詳解は次のファイルから抽出されました: