Class RedisAccessor
java.lang.Object
org.springframework.data.redis.core.RedisAccessor
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
RedisTemplate
public class RedisAccessor
extends Object
implements org.springframework.beans.factory.InitializingBean
Base class for
RedisTemplate
defining common properties. Not intended to be used directly.- Author:
- Costin Leau, John Blum
- See Also:
-
InitializingBean
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.apache.commons.logging.Log
Logger available to subclasses -
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
protected final org.apache.commons.logging.Log loggerLogger available to subclasses
-
-
Constructor Details
-
RedisAccessor
public RedisAccessor()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
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:
-