protected RedisClusterAsyncCommands<byte[], byte[]> getAsyncDedicatedConnection() { if (asyncDedicatedConn == null) { asyncDedicatedConn = doGetAsyncDedicatedConnection(); if (asyncDedicatedConn instanceof StatefulRedisConnection) { ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).sync().select(dbIndex); } } if (asyncDedicatedConn instanceof StatefulRedisConnection) { return ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).async(); } if (asyncDedicatedConn instanceof StatefulRedisClusterConnection) { return ((StatefulRedisClusterConnection<byte[], byte[]>) asyncDedicatedConn).async(); } throw new IllegalStateException( String.format("%s is not a supported connection type.", asyncDedicatedConn.getClass().getName())); }
RedisClusterCommands<byte[], byte[]> getDedicatedConnection() { if (asyncDedicatedConn == null) { asyncDedicatedConn = doGetAsyncDedicatedConnection(); if (asyncDedicatedConn instanceof StatefulRedisConnection) { ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).sync().select(dbIndex); } } if (asyncDedicatedConn instanceof StatefulRedisConnection) { return ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).sync(); } if (asyncDedicatedConn instanceof StatefulRedisClusterConnection) { return ((StatefulRedisClusterConnection<byte[], byte[]>) asyncDedicatedConn).sync(); } throw new IllegalStateException( String.format("%s is not a supported connection type.", asyncDedicatedConn.getClass().getName())); }
protected RedisClusterAsyncCommands<byte[], byte[]> getAsyncDedicatedConnection() { if (asyncDedicatedConn == null) { asyncDedicatedConn = doGetAsyncDedicatedConnection(); if (asyncDedicatedConn instanceof StatefulRedisConnection) { ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).sync().select(dbIndex); } } if (asyncDedicatedConn instanceof StatefulRedisConnection) { return ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).async(); } if (asyncDedicatedConn instanceof StatefulRedisClusterConnection) { return ((StatefulRedisClusterConnection<byte[], byte[]>) asyncDedicatedConn).async(); } throw new IllegalStateException( String.format("%s is not a supported connection type.", asyncDedicatedConn.getClass().getName())); }
RedisClusterCommands<byte[], byte[]> getDedicatedConnection() { if (asyncDedicatedConn == null) { asyncDedicatedConn = doGetAsyncDedicatedConnection(); if (asyncDedicatedConn instanceof StatefulRedisConnection) { ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).sync().select(dbIndex); } } if (asyncDedicatedConn instanceof StatefulRedisConnection) { return ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).sync(); } if (asyncDedicatedConn instanceof StatefulRedisClusterConnection) { return ((StatefulRedisClusterConnection<byte[], byte[]>) asyncDedicatedConn).sync(); } throw new IllegalStateException( String.format("%s is not a supported connection type.", asyncDedicatedConn.getClass().getName())); }
RedisClusterCommands<byte[], byte[]> getDedicatedConnection() { if (asyncDedicatedConn == null) { asyncDedicatedConn = doGetAsyncDedicatedConnection(); if (asyncDedicatedConn instanceof StatefulRedisConnection) { ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).sync().select(dbIndex); } } if (asyncDedicatedConn instanceof StatefulRedisConnection) { return ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).sync(); } if (asyncDedicatedConn instanceof StatefulRedisClusterConnection) { return ((StatefulRedisClusterConnection<byte[], byte[]>) asyncDedicatedConn).sync(); } throw new IllegalStateException( String.format("%s is not a supported connection type.", asyncDedicatedConn.getClass().getName())); }
protected RedisClusterAsyncCommands<byte[], byte[]> getAsyncDedicatedConnection() { if (asyncDedicatedConn == null) { asyncDedicatedConn = doGetAsyncDedicatedConnection(); if (asyncDedicatedConn instanceof StatefulRedisConnection) { ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).sync().select(dbIndex); } } if (asyncDedicatedConn instanceof StatefulRedisConnection) { return ((StatefulRedisConnection<byte[], byte[]>) asyncDedicatedConn).async(); } if (asyncDedicatedConn instanceof StatefulRedisClusterConnection) { return ((StatefulRedisClusterConnection<byte[], byte[]>) asyncDedicatedConn).async(); } throw new IllegalStateException( String.format("%s is not a supported connection type.", asyncDedicatedConn.getClass().getName())); }