List of usage examples for org.springframework.data.redis.connection RedisConnection eval
@Nullable <T> T eval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Evaluate given {@code script}.// ww w. ja v a 2 s . co m * <p> * See http://redis.io/commands/eval * * @param <T> t * @param script script * @param returnType returnType * @param numKeys numKeys * @param keysAndArgs keysAndArgs * @return T */ public static <T> T eval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs) { return redisTemplate.execute(new RedisCallback<T>() { @Override public T doInRedis(RedisConnection redis) throws DataAccessException { return redis.eval(script, returnType, numKeys, keysAndArgs); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Evaluate given {@code script}.//from w ww . jav a2 s .c om * <p> * See http://redis.io/commands/eval * * @param <T> t * @param script script * @param returnType returnType * @param numKeys numKeys * @param keysAndArgs keysAndArgs * @return T */ public <T> T eval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs) { return redisTemplate.execute(new RedisCallback<T>() { @Override public T doInRedis(RedisConnection redis) throws DataAccessException { return redis.eval(script, returnType, numKeys, keysAndArgs); } }); }