public class RedisHashCacheManager
extends org.springframework.cache.transaction.AbstractTransactionSupportingCacheManager
RedisCacheManager 进行了扩展, 添加了对 Hash类型的缓存的支持CacheManager backed by a Redis cache.
This cache manager creates caches by default upon first write. Empty caches are not visible on Redis due to how Redis
represents empty data structures.
Caches requiring a different RedisCacheConfiguration than the default configuration can be specified via
RedisHashCacheManager.RedisHashCacheManagerBuilder.withInitialCacheConfigurations(Map).RedisCacheConfiguration,
RedisHashCacheWriter| 限定符和类型 | 类和说明 |
|---|---|
static class |
RedisHashCacheManager.RedisHashCacheManagerBuilder
Configurator for creating
RedisHashCacheManager. |
| 构造器和说明 |
|---|
RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration)
Creates new
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration. |
RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration,
boolean allowInFlightCacheCreation,
String... initialCacheNames)
Creates new
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration. |
RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration,
Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> initialCacheConfigurations)
Creates new
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration. |
RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration,
Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> initialCacheConfigurations,
boolean allowInFlightCacheCreation)
Creates new
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration. |
RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration,
String... initialCacheNames)
Creates new
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration. |
| 限定符和类型 | 方法和说明 |
|---|---|
static RedisHashCacheManager.RedisHashCacheManagerBuilder |
builder()
Entry point for builder style
RedisHashCacheManager configuration. |
static RedisHashCacheManager.RedisHashCacheManagerBuilder |
builder(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
Entry point for builder style
RedisHashCacheManager configuration. |
static RedisHashCacheManager.RedisHashCacheManagerBuilder |
builder(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter)
Entry point for builder style
RedisHashCacheManager configuration. |
static RedisHashCacheManager |
create(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
Create a new
RedisHashCacheManager with defaults applied. |
protected org.springframework.data.redis.cache.RedisCache |
createRedisCache(String name,
org.springframework.data.redis.cache.RedisCacheConfiguration cacheConfig)
Configuration hook for creating
RedisCache with given name and cacheConfig. |
Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> |
getCacheConfigurations() |
protected org.springframework.data.redis.cache.RedisCache |
getMissingCache(String name) |
protected Collection<org.springframework.data.redis.cache.RedisCache> |
loadCaches() |
decorateCache, isTransactionAware, setTransactionAwarepublic RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration)
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration.cacheWriter - must not be null.defaultCacheConfiguration - must not be null. Maybe just use
RedisCacheConfiguration.defaultCacheConfig().public RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration,
String... initialCacheNames)
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration.cacheWriter - must not be null.defaultCacheConfiguration - must not be null. Maybe just use
RedisCacheConfiguration.defaultCacheConfig().initialCacheNames - optional set of known cache names that will be created with given
defaultCacheConfiguration.public RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration,
boolean allowInFlightCacheCreation,
String... initialCacheNames)
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration.cacheWriter - must not be null.defaultCacheConfiguration - must not be null. Maybe just use
RedisCacheConfiguration.defaultCacheConfig().allowInFlightCacheCreation - if set to true no new caches can be acquire at runtime but limited to
the given list of initial cache names.initialCacheNames - optional set of known cache names that will be created with given
defaultCacheConfiguration.public RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration,
Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> initialCacheConfigurations)
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration.cacheWriter - must not be null.defaultCacheConfiguration - must not be null. Maybe just use
RedisCacheConfiguration.defaultCacheConfig().initialCacheConfigurations - Map of known cache names along with the configuration to use for those caches.
Must not be null.public RedisHashCacheManager(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter,
org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration,
Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> initialCacheConfigurations,
boolean allowInFlightCacheCreation)
RedisHashCacheManager using given RedisHashCacheWriter and default
RedisCacheConfiguration.cacheWriter - must not be null.defaultCacheConfiguration - must not be null. Maybe just use
RedisCacheConfiguration.defaultCacheConfig().initialCacheConfigurations - Map of known cache names along with the configuration to use for those caches.
Must not be null.allowInFlightCacheCreation - if set to false this cache manager is limited to the initial cache
configurations and will not create new caches at runtime.public static RedisHashCacheManager create(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
RedisHashCacheManager with defaults applied.
RedisCacheConfiguration.defaultCacheConfig()connectionFactory - must not be null.RedisHashCacheManager.public static RedisHashCacheManager.RedisHashCacheManagerBuilder builder()
RedisHashCacheManager configuration.RedisHashCacheManager.RedisHashCacheManagerBuilder.public static RedisHashCacheManager.RedisHashCacheManagerBuilder builder(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
RedisHashCacheManager configuration.connectionFactory - must not be null.RedisHashCacheManager.RedisHashCacheManagerBuilder.public static RedisHashCacheManager.RedisHashCacheManagerBuilder builder(top.dcenter.ums.security.core.oauth.repository.jdbc.cache.RedisHashCacheWriter cacheWriter)
RedisHashCacheManager configuration.cacheWriter - must not be null.RedisHashCacheManager.RedisHashCacheManagerBuilder.@NonNull protected Collection<org.springframework.data.redis.cache.RedisCache> loadCaches()
loadCaches 在类中 org.springframework.cache.support.AbstractCacheManagerprotected org.springframework.data.redis.cache.RedisCache getMissingCache(@NonNull
String name)
getMissingCache 在类中 org.springframework.cache.support.AbstractCacheManagerpublic Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> getCacheConfigurations()
Map containing cache name / configuration pairs. Never null.protected org.springframework.data.redis.cache.RedisCache createRedisCache(String name, @Nullable org.springframework.data.redis.cache.RedisCacheConfiguration cacheConfig)
RedisCache with given name and cacheConfig.name - must not be null.cacheConfig - can be null.Copyright © 2021. All rights reserved.