Class RedisAccessor
java.lang.Object
org.springframework.data.redis.core.RedisAccessor
- All Implemented Interfaces:
InitializingBean
- Direct Known Subclasses:
RedisTemplate
Base class for
RedisTemplate
implementations defining common properties. Not intended to be used directly.- Author:
- Costin Leau, John Blum
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns the factory configured to acquire connections and perform operations on the connected Redis instance.Returns the requiredRedisConnectionFactory
, throwing anIllegalStateException
if theRedisConnectionFactory
is not set.void
setConnectionFactory
(RedisConnectionFactory connectionFactory) Sets the factory used to acquire connections and perform operations on the connected Redis instance.
-
Field Details
-
logger
Logger available to subclasses
-
-
Constructor Details
-
RedisAccessor
public RedisAccessor()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
-
getConnectionFactory
Returns the factory configured to acquire connections and perform operations on the connected Redis instance.- Returns:
- the configured
RedisConnectionFactory
. Can be null. - See Also:
-
getRequiredConnectionFactory
Returns the requiredRedisConnectionFactory
, throwing anIllegalStateException
if theRedisConnectionFactory
is not set.- Returns:
- the configured
RedisConnectionFactory
. - Throws:
IllegalStateException
- if theRedisConnectionFactory
is not set.- Since:
- 2.0
- See Also:
-
setConnectionFactory
Sets the factory used to acquire connections and perform operations on the connected Redis instance.- Parameters:
connectionFactory
-RedisConnectionFactory
used to acquire connections.- See Also:
-