redis.clients.jedis.commands.RedisPipeline Java Examples

The following examples show how to use redis.clients.jedis.commands.RedisPipeline. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JedisClientDelegate.java    From kork with Apache License 2.0 5 votes vote down vote up
@Override
public void syncPipeline(RedisPipeline p) {
  if (!(p instanceof Pipeline)) {
    throw new IllegalArgumentException(
        "Invalid RedisPipeline implementation: " + p.getClass().getName());
  }

  ((Pipeline) p).sync();
}
 
Example #2
Source File: JedisClientDelegate.java    From kork with Apache License 2.0 4 votes vote down vote up
@Override
public void withPipeline(Consumer<RedisPipeline> f) {
  try (Jedis jedis = jedisPool.getResource()) {
    f.accept(jedis.pipelined());
  }
}
 
Example #3
Source File: JedisClientDelegate.java    From kork with Apache License 2.0 4 votes vote down vote up
@Override
public <R> R withPipeline(Function<RedisPipeline, R> f) {
  try (Jedis jedis = jedisPool.getResource()) {
    return f.apply(jedis.pipelined());
  }
}
 
Example #4
Source File: RedisClientDelegate.java    From kork with Apache License 2.0 votes vote down vote up
void withPipeline(Consumer<RedisPipeline> f); 
Example #5
Source File: RedisClientDelegate.java    From kork with Apache License 2.0 votes vote down vote up
<R> R withPipeline(Function<RedisPipeline, R> f); 
Example #6
Source File: RedisClientDelegate.java    From kork with Apache License 2.0 votes vote down vote up
void syncPipeline(RedisPipeline p);