List of usage examples for org.springframework.data.redis.connection RedisConnection rename
void rename(byte[] sourceKey, byte[] targetKey);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Rename key {@code oleName} to {@code newName}. * <p>/* w w w . j a v a 2s . co m*/ * See http://redis.io/commands/rename * * @param oldName oldName * @param newName newName */ public static void rename(byte[] oldName, byte[] newName) { redisTemplate.execute(new RedisCallback<Void>() { @Override public Void doInRedis(RedisConnection redis) throws DataAccessException { redis.rename(oldName, newName); return null; } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Rename key {@code oleName} to {@code newName}. * <p>//from w ww . ja va 2 s.c om * See http://redis.io/commands/rename * * @param oldName oldName * @param newName newName */ public void rename(byte[] oldName, byte[] newName) { redisTemplate.execute(new RedisCallback<Void>() { @Override public Void doInRedis(RedisConnection redis) throws DataAccessException { redis.rename(oldName, newName); return null; } }); }