@SuppressWarnings("unchecked") private RedisCommands<byte[], byte[]> getDedicatedRedisCommands() { return (RedisCommands) getDedicatedConnection(); }
RedisClusterCommands<byte[], byte[]> getDedicatedConnection() { return connection.getDedicatedConnection(); }
protected RedisClusterCommands<byte[], byte[]> getConnection() { if (isQueueing()) { return getDedicatedConnection(); } if (asyncSharedConn != null) { if (asyncSharedConn instanceof StatefulRedisConnection) { return ((StatefulRedisConnection<byte[], byte[]>) asyncSharedConn).sync(); } if (asyncSharedConn instanceof StatefulRedisClusterConnection) { return ((StatefulRedisClusterConnection<byte[], byte[]>) asyncSharedConn).sync(); } } return getDedicatedConnection(); }
@Override public byte[] bRPopLPush(int timeout, byte[] srcKey, byte[] dstKey) { Assert.notNull(srcKey, "Source key must not be null!"); Assert.notNull(dstKey, "Destination key must not be null!"); try { if (isPipelined()) { pipeline( connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpoplpush(timeout, srcKey, dstKey))); return null; } if (isQueueing()) { transaction( connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpoplpush(timeout, srcKey, dstKey))); return null; } return connection.getDedicatedConnection().brpoplpush(timeout, srcKey, dstKey); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public List<byte[]> bLPop(int timeout, byte[]... keys) { Assert.notNull(keys, "Key must not be null!"); Assert.noNullElements(keys, "Keys must not contain null elements!"); try { if (isPipelined()) { pipeline(connection.newLettuceResult(connection.getAsyncDedicatedConnection().blpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(connection.getAsyncDedicatedConnection().blpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } return LettuceConverters.toBytesList(connection.getDedicatedConnection().blpop(timeout, keys)); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public List<byte[]> bRPop(int timeout, byte[]... keys) { Assert.notNull(keys, "Key must not be null!"); Assert.noNullElements(keys, "Keys must not contain null elements!"); try { if (isPipelined()) { pipeline(connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } return LettuceConverters.toBytesList(connection.getDedicatedConnection().brpop(timeout, keys)); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@SuppressWarnings("unchecked") private RedisCommands<byte[], byte[]> getDedicatedRedisCommands() { return (RedisCommands) getDedicatedConnection(); }
@SuppressWarnings("unchecked") private RedisCommands<byte[], byte[]> getDedicatedRedisCommands() { return (RedisCommands) getDedicatedConnection(); }
protected RedisClusterCommands<byte[], byte[]> getConnection() { if (isQueueing()) { return getDedicatedConnection(); } if (asyncSharedConn != null) { if (asyncSharedConn instanceof StatefulRedisConnection) { return ((StatefulRedisConnection<byte[], byte[]>) asyncSharedConn).sync(); } if (asyncSharedConn instanceof StatefulRedisClusterConnection) { return ((StatefulRedisClusterConnection<byte[], byte[]>) asyncSharedConn).sync(); } } return getDedicatedConnection(); }
protected RedisClusterCommands<byte[], byte[]> getConnection() { if (isQueueing()) { return getDedicatedConnection(); } if (asyncSharedConn != null) { if (asyncSharedConn instanceof StatefulRedisConnection) { return ((StatefulRedisConnection<byte[], byte[]>) asyncSharedConn).sync(); } if (asyncSharedConn instanceof StatefulRedisClusterConnection) { return ((StatefulRedisClusterConnection<byte[], byte[]>) asyncSharedConn).sync(); } } return getDedicatedConnection(); }
@Override public byte[] bRPopLPush(int timeout, byte[] srcKey, byte[] dstKey) { Assert.notNull(srcKey, "Source key must not be null!"); Assert.notNull(dstKey, "Destination key must not be null!"); try { if (isPipelined()) { pipeline( connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpoplpush(timeout, srcKey, dstKey))); return null; } if (isQueueing()) { transaction( connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpoplpush(timeout, srcKey, dstKey))); return null; } return connection.getDedicatedConnection().brpoplpush(timeout, srcKey, dstKey); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public byte[] bRPopLPush(int timeout, byte[] srcKey, byte[] dstKey) { Assert.notNull(srcKey, "Source key must not be null!"); Assert.notNull(dstKey, "Destination key must not be null!"); try { if (isPipelined()) { pipeline( connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpoplpush(timeout, srcKey, dstKey))); return null; } if (isQueueing()) { transaction( connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpoplpush(timeout, srcKey, dstKey))); return null; } return connection.getDedicatedConnection().brpoplpush(timeout, srcKey, dstKey); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public List<byte[]> bLPop(int timeout, byte[]... keys) { Assert.notNull(keys, "Key must not be null!"); Assert.noNullElements(keys, "Keys must not contain null elements!"); try { if (isPipelined()) { pipeline(connection.newLettuceResult(connection.getAsyncDedicatedConnection().blpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(connection.getAsyncDedicatedConnection().blpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } return LettuceConverters.toBytesList(connection.getDedicatedConnection().blpop(timeout, keys)); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public List<byte[]> bLPop(int timeout, byte[]... keys) { Assert.notNull(keys, "Key must not be null!"); Assert.noNullElements(keys, "Keys must not contain null elements!"); try { if (isPipelined()) { pipeline(connection.newLettuceResult(connection.getAsyncDedicatedConnection().blpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(connection.getAsyncDedicatedConnection().blpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } return LettuceConverters.toBytesList(connection.getDedicatedConnection().blpop(timeout, keys)); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public List<byte[]> bRPop(int timeout, byte[]... keys) { Assert.notNull(keys, "Key must not be null!"); Assert.noNullElements(keys, "Keys must not contain null elements!"); try { if (isPipelined()) { pipeline(connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } return LettuceConverters.toBytesList(connection.getDedicatedConnection().brpop(timeout, keys)); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public List<byte[]> bRPop(int timeout, byte[]... keys) { Assert.notNull(keys, "Key must not be null!"); Assert.noNullElements(keys, "Keys must not contain null elements!"); try { if (isPipelined()) { pipeline(connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(connection.getAsyncDedicatedConnection().brpop(timeout, keys), LettuceConverters.keyValueToBytesList())); return null; } return LettuceConverters.toBytesList(connection.getDedicatedConnection().brpop(timeout, keys)); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }