public class JCacheCacheManager extends AbstractTransactionSupportingCacheManager
javax.cache.CacheManager
によってサポートされる CacheManager
実装。メモ: このクラスは、Spring 4.0 以降、JCache 1.0 用に更新されました。
コンストラクターと説明 |
---|
JCacheCacheManager() バッキング JCache javax.cache.CacheManager なしで新しい JCacheCacheManager を作成します。 |
JCacheCacheManager(javax.cache.CacheManager cacheManager) 指定されたバッキング JCache javax.cache.CacheManager の新しい JCacheCacheManager を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | afterPropertiesSet() |
javax.cache.CacheManager | getCacheManager() バッキング JCache javax.cache.CacheManager を返します。 |
protected Cache | getMissingCache(java.lang.String name) 指定された name または null で不足しているキャッシュが存在しないか、その場で作成できなかった場合は、そのキャッシュを返します。 |
boolean | isAllowNullValues() このキャッシュマネージャーが、すべてのキャッシュの null 値を受け入れて変換するかどうかを返します。 |
protected java.util.Collection<Cache> | loadCaches() このキャッシュマネージャーの初期キャッシュをロードします。 |
void | setAllowNullValues(boolean allowNullValues) このキャッシュマネージャーのすべてのキャッシュの null 値を受け入れて変換するかどうかを指定します。 |
void | setCacheManager(javax.cache.CacheManager cacheManager) バッキング JCache javax.cache.CacheManager を設定します。 |
decorateCache, isTransactionAware, setTransactionAware
addCache, getCache, getCacheNames, initializeCaches, lookupCache
public JCacheCacheManager()
javax.cache.CacheManager
なしで新しい JCacheCacheManager
を作成します。 バッキング JCache javax.cache.CacheManager
は、setCacheManager(javax.cache.CacheManager)
Bean プロパティを介して設定できます。
public JCacheCacheManager(javax.cache.CacheManager cacheManager)
javax.cache.CacheManager
の新しい JCacheCacheManager
を作成します。cacheManager
- バッキング JCache javax.cache.CacheManager
public void setCacheManager(@Nullable javax.cache.CacheManager cacheManager)
javax.cache.CacheManager
を設定します。@Nullable public javax.cache.CacheManager getCacheManager()
javax.cache.CacheManager
を返します。public void setAllowNullValues(boolean allowNullValues)
null
値を受け入れて変換するかどうかを指定します。JSR-107 自体が null
値をサポートしていないにもかかわらず、デフォルトは "true" です。内部ホルダーオブジェクトは、ユーザーレベルの null
を格納するために使用されます。
public boolean isAllowNullValues()
null
値を受け入れて変換するかどうかを返します。public void afterPropertiesSet()
InitializingBean
BeanFactoryAware
、ApplicationContextAware
などを満たした後、包含 BeanFactory
によって呼び出されます。このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。
InitializingBean
の afterPropertiesSet
AbstractCacheManager
の afterPropertiesSet
protected java.util.Collection<Cache> loadCaches()
AbstractCacheManager
起動時に AbstractCacheManager.afterPropertiesSet()
によって呼び出されます。返されるコレクションは空の場合がありますが、null
であってはなりません。
AbstractCacheManager
の loadCaches
protected Cache getMissingCache(java.lang.String name)
AbstractCacheManager
name
または null
で不足しているキャッシュが存在しないか、その場で作成できなかった場合は、そのキャッシュを返します。一部のキャッシュは、ネイティブプロバイダーがサポートしている場合、実行時に作成される場合があります。名前による検索で結果が得られない場合、サブクラスは実行時にそのようなキャッシュを登録する機会を得ます。返されたキャッシュは、このインスタンスに自動的に追加されます。
AbstractCacheManager
の getMissingCache
name
- 取得するキャッシュの名前 null
(そのようなキャッシュが存在しないか作成できない場合)AbstractCacheManager.getCache(String)