Package org.togglz.redis
Class RedisStateRepository.Builder
- java.lang.Object
-
- org.togglz.redis.RedisStateRepository.Builder
-
- Enclosing class:
- RedisStateRepository
public static class RedisStateRepository.Builder extends Object
Builder for aRedisStateRepository.Can be used as follows:
StateRepository stateRepository = new RedisStateRepository.Builder(). jedisPool(new JedisPool("hostname")). keyPrefix("toggles:"). build();
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a new builder for aRedisStateRepository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RedisStateRepositorybuild()Creates a newRedisStateRepositoryusing the current settings.RedisStateRepository.BuilderjedisPool(redis.clients.jedis.util.Pool<redis.clients.jedis.Jedis> jedisPool)Sets the Jedis Pool.RedisStateRepository.BuilderkeyPrefix(String keyPrefix)Sets the Redis key prefix to be used when getting or setting the state of the features.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a new builder for aRedisStateRepository.
-
-
Method Detail
-
jedisPool
public RedisStateRepository.Builder jedisPool(redis.clients.jedis.util.Pool<redis.clients.jedis.Jedis> jedisPool)
Sets the Jedis Pool.- Parameters:
jedisPool- the Jedis PoolJedisPool
-
keyPrefix
public RedisStateRepository.Builder keyPrefix(String keyPrefix)
Sets the Redis key prefix to be used when getting or setting the state of the features.- Parameters:
keyPrefix- the key prefix to be used in Redis
-
build
public RedisStateRepository build()
Creates a newRedisStateRepositoryusing the current settings.
-
-