Class JedisConnectionFactory

java.lang.Object
org.springframework.data.redis.connection.jedis.JedisConnectionFactory
All Implemented Interfaces:
DisposableBean, InitializingBean, Lifecycle, Phased, SmartLifecycle, PersistenceExceptionTranslator, RedisConnectionFactory

public class JedisConnectionFactory extends Object implements RedisConnectionFactory, InitializingBean, DisposableBean, SmartLifecycle
Connection factory creating Jedis based connections.

JedisConnectionFactory should be configured using an environmental configuration and the client configuration. Jedis supports the following environmental configurations:

This connection factory implements InitializingBean and SmartLifecycle for flexible lifecycle control. It must be initialized and started before you can obtain a connection. Initialization starts this bean by default. You can Lifecycle.stop() and restart this connection factory if needed.

Note that JedisConnection and its clustered variant are not Thread-safe and instances should not be shared across threads. Refer to the Jedis documentation for guidance on configuring Jedis in a multithreaded environment.

Author:
Costin Leau, Thomas Darimont, Christoph Strobl, Mark Paluch, Fu Jian, Ajith Kumar
See Also: