List of usage examples for org.springframework.data.redis.connection RedisConnection slaveOfNoOne
void slaveOfNoOne();
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Change server into master./*from ww w . ja va 2 s.co m*/ * <p> * See http://redis.io/commands/slaveof * * @since 1.3 */ public static void slaveOfNoOne() { redisTemplate.execute(new RedisCallback<Void>() { @Override public Void doInRedis(RedisConnection redis) throws DataAccessException { redis.slaveOfNoOne(); return null; } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Change server into master./*from w w w . ja v a 2 s . c o m*/ * <p> * See http://redis.io/commands/slaveof * * @since 1.3 */ public void slaveOfNoOne() { redisTemplate.execute(new RedisCallback<Void>() { @Override public Void doInRedis(RedisConnection redis) throws DataAccessException { redis.slaveOfNoOne(); return null; } }); }