keycloak
静的限定公開変数類 | 関数 | 静的関数 | 非公開変数類 | 全メンバ一覧
org.keycloak.cluster.infinispan.CrossDCAwareCacheFactory.InfinispanCacheWrapperFactory クラス
org.keycloak.cluster.infinispan.CrossDCAwareCacheFactory.InfinispanCacheWrapperFactory の継承関係図
Inheritance graph
org.keycloak.cluster.infinispan.CrossDCAwareCacheFactory.InfinispanCacheWrapperFactory 連携図
Collaboration graph

静的限定公開変数類

static final Logger logger = Logger.getLogger(CrossDCAwareCacheFactory.class)
 

関数

 InfinispanCacheWrapperFactory (Cache< String, Serializable > workCache)
 
BasicCache< String, Serializable > getCache ()
 

静的関数

static CrossDCAwareCacheFactory getFactory (Cache< String, Serializable > workCache, Set< RemoteStore > remoteStores)
 

非公開変数類

final Cache< String, Serializable > workCache
 

詳解

構築子と解体子

◆ InfinispanCacheWrapperFactory()

71  {
72  this.workCache = workCache;
73  }
final Cache< String, Serializable > workCache
Definition: CrossDCAwareCacheFactory.java:69

関数詳解

◆ getCache()

BasicCache<String, Serializable> org.keycloak.cluster.infinispan.CrossDCAwareCacheFactory.InfinispanCacheWrapperFactory.getCache ( )
inlinepackage
76  {
77  return workCache;
78  }
final Cache< String, Serializable > workCache
Definition: CrossDCAwareCacheFactory.java:69

◆ getFactory()

static CrossDCAwareCacheFactory org.keycloak.cluster.infinispan.CrossDCAwareCacheFactory.getFactory ( Cache< String, Serializable >  workCache,
Set< RemoteStore >  remoteStores 
)
inlinestaticpackageinherited
41  {
42  if (remoteStores.isEmpty()) {
43  logger.debugf("No configured remoteStore available. Cross-DC scenario is not used");
44  return new InfinispanCacheWrapperFactory(workCache);
45  } else {
46  logger.debugf("RemoteStore is available. Cross-DC scenario will be used");
47 
48  if (remoteStores.size() > 1) {
49  logger.warnf("More remoteStores configured for work cache. Will use just the first one");
50  }
51 
52  // For cross-DC scenario, we need to return underlying remoteCache for atomic operations to work properly
53  RemoteStore remoteStore = remoteStores.iterator().next();
54  RemoteCache remoteCache = remoteStore.getRemoteCache();
55 
56  if (remoteCache == null) {
57  String cacheName = remoteStore.getConfiguration().remoteCacheName();
58  throw new IllegalStateException("Remote cache '" + cacheName + "' is not available.");
59  }
60 
61  return new RemoteCacheWrapperFactory(remoteCache);
62  }
63  }
static final Logger logger
Definition: CrossDCAwareCacheFactory.java:35

メンバ詳解

◆ logger

final Logger org.keycloak.cluster.infinispan.CrossDCAwareCacheFactory.logger = Logger.getLogger(CrossDCAwareCacheFactory.class)
staticprotectedinherited

◆ workCache

final Cache<String, Serializable> org.keycloak.cluster.infinispan.CrossDCAwareCacheFactory.InfinispanCacheWrapperFactory.workCache
private

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