public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
@Override protected RedisSentinelConnection getSentinelConnection(RedisNode sentinel) { StatefulRedisSentinelConnection<String, String> connection = getConnection(sentinel); return new LettuceSentinelConnection(connection); }
@Override protected boolean isActive(RedisNode node) { StatefulRedisSentinelConnection<String, String> connection = null; try { connection = getConnection(node); return connection.sync().ping().equalsIgnoreCase("pong"); } catch (Exception e) { return false; } finally { if (connection != null) { connectionProvider.release(connection); } } }
@Override public String ping() { try { if (isPipelined()) { pipeline(newLettuceResult(getAsyncConnection().ping())); return null; } if (isQueueing()) { transaction(newLettuceResult(getAsyncConnection().ping())); return null; } return getConnection().ping(); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public Long publish(byte[] channel, byte[] message) { try { if (isPipelined()) { pipeline(newLettuceResult(getAsyncConnection().publish(channel, message))); return null; } if (isQueueing()) { transaction(newLettuceResult(getAsyncConnection().publish(channel, message))); return null; } return getConnection().publish(channel, message); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public byte[] echo(byte[] message) { try { if (isPipelined()) { pipeline(newLettuceResult(getAsyncConnection().echo(message))); return null; } if (isQueueing()) { transaction(newLettuceResult(getAsyncConnection().echo(message))); return null; } return getConnection().echo(message); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public void select(int dbIndex) { if (asyncSharedConn != null) { throw new UnsupportedOperationException("Selecting a new database not supported due to shared connection. " + "Use separate ConnectionFactorys to work with multiple databases"); } try { this.dbIndex = dbIndex; if (isPipelined()) { pipeline(new LettuceStatusResult(getAsyncConnection().dispatch(CommandType.SELECT, new StatusOutput<>(ByteArrayCodec.INSTANCE), new CommandArgs<>(ByteArrayCodec.INSTANCE).add(dbIndex)))); return; } if (isQueueing()) { transaction(newLettuceStatusResult(getAsyncConnection().dispatch(CommandType.SELECT, new StatusOutput<>(ByteArrayCodec.INSTANCE), new CommandArgs<>(ByteArrayCodec.INSTANCE).add(dbIndex)))); return; } ((RedisCommands) getConnection()).select(dbIndex); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
public RedisClusterCommands<byte[], byte[]> getConnection() { return connection.getConnection(); }
@Override protected RedisSentinelConnection getSentinelConnection(RedisNode sentinel) { StatefulRedisSentinelConnection<String, String> connection = getConnection(sentinel); return new LettuceSentinelConnection(connection); }