List of usage examples for org.springframework.data.redis.connection RedisConnection setBit
@Nullable Boolean setBit(byte[] key, long offset, boolean value);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Sets the bit at {@code offset} in value stored at {@code key}. * <p>/*from w w w. j av a 2s. c o m*/ * See http://redis.io/commands/setbit * * @param key must not be {@literal null}. * @param offset offset * @param value value * @return the original bit value stored at {@code offset}. */ public static Boolean setBit(byte[] key, long offset, boolean value) { return redisTemplate.execute(new RedisCallback<Boolean>() { @Override public Boolean doInRedis(RedisConnection redis) throws DataAccessException { return redis.setBit(key, offset, value); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Sets the bit at {@code offset} in value stored at {@code key}. * <p>/*w ww . j a v a2 s .c o m*/ * See http://redis.io/commands/setbit * * @param key must not be {@literal null}. * @param offset offset * @param value value * @return the original bit value stored at {@code offset}. */ public Boolean setBit(byte[] key, long offset, boolean value) { return redisTemplate.execute(new RedisCallback<Boolean>() { @Override public Boolean doInRedis(RedisConnection redis) throws DataAccessException { return redis.setBit(key, offset, value); } }); }