List of usage examples for org.springframework.data.redis.connection RedisConnection migrate
void migrate(byte[] key, RedisNode target, int dbIndex, @Nullable MigrateOption option, long timeout);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * @param key must not be {@literal null}. * @param target must not be {@literal null}. * @param dbIndex dbIndex/* w ww.ja v a 2 s . c o m*/ * @param option can be {@literal null}. Defaulted to {@link MigrateOption#COPY}. * @param timeout timeout * @since 1.7 */ public static void migrate(byte[] key, RedisNode target, int dbIndex, MigrateOption option, long timeout) { redisTemplate.execute(new RedisCallback<Void>() { @Override public Void doInRedis(RedisConnection redis) throws DataAccessException { redis.migrate(key, target, dbIndex, option, timeout); return null; } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * @param key must not be {@literal null}. * @param target must not be {@literal null}. * @param dbIndex dbIndex//from www. j a v a 2 s .c o m * @param option can be {@literal null}. Defaulted to {@link MigrateOption#COPY}. * @param timeout timeout * @since 1.7 */ public void migrate(byte[] key, RedisNode target, int dbIndex, MigrateOption option, long timeout) { redisTemplate.execute(new RedisCallback<Void>() { @Override public Void doInRedis(RedisConnection redis) throws DataAccessException { redis.migrate(key, target, dbIndex, option, timeout); return null; } }); }