/** * @return the shared connection using {@link ByteBuffer} encoding for reactive API use. {@literal null} if * {@link #getShareNativeConnection() connection sharing} is disabled. * @since 2.0.1 */ @Nullable protected StatefulConnection<ByteBuffer, ByteBuffer> getSharedReactiveConnection() { return shareNativeConnection ? getOrCreateSharedReactiveConnection().getConnection() : null; }
/** * @return the shared connection using {@literal byte} array encoding for imperative API use. {@literal null} if * {@link #getShareNativeConnection() connection sharing} is disabled. */ @Nullable protected StatefulRedisConnection<byte[], byte[]> getSharedConnection() { return shareNativeConnection ? (StatefulRedisConnection) getOrCreateSharedConnection().getConnection() : null; }
/** * @return the shared connection using {@link ByteBuffer} encoding for reactive API use. {@literal null} if * {@link #getShareNativeConnection() connection sharing} is disabled. * @since 2.0.1 */ @Nullable protected StatefulConnection<ByteBuffer, ByteBuffer> getSharedReactiveConnection() { return shareNativeConnection ? getOrCreateSharedReactiveConnection().getConnection() : null; }
@Override public RedisClusterConnection getClusterConnection() { if (!isClusterAware()) { throw new InvalidDataAccessApiUsageException("Cluster is not configured!"); } RedisClusterClient clusterClient = (RedisClusterClient) client; return getShareNativeConnection() ? new LettuceClusterConnection( (StatefulRedisClusterConnection<byte[], byte[]>) getOrCreateSharedConnection().getConnection(), connectionProvider, clusterClient, clusterCommandExecutor, clientConfiguration.getCommandTimeout()) : new LettuceClusterConnection(null, connectionProvider, clusterClient, clusterCommandExecutor, clientConfiguration.getCommandTimeout()); }
@Override public RedisClusterConnection getClusterConnection() { if (!isClusterAware()) { throw new InvalidDataAccessApiUsageException("Cluster is not configured!"); } RedisClusterClient clusterClient = (RedisClusterClient) client; return getShareNativeConnection() ? new LettuceClusterConnection( (StatefulRedisClusterConnection<byte[], byte[]>) getOrCreateSharedConnection().getConnection(), connectionProvider, clusterClient, clusterCommandExecutor, clientConfiguration.getCommandTimeout()) : new LettuceClusterConnection(null, connectionProvider, clusterClient, clusterCommandExecutor, clientConfiguration.getCommandTimeout()); }
/** * @return the shared connection using {@link ByteBuffer} encoding for reactive API use. {@literal null} if * {@link #getShareNativeConnection() connection sharing} is disabled. * @since 2.0.1 */ @Nullable protected StatefulConnection<ByteBuffer, ByteBuffer> getSharedReactiveConnection() { return shareNativeConnection ? getOrCreateSharedReactiveConnection().getConnection() : null; }
/** * @return the shared connection using {@literal byte} array encoding for imperative API use. {@literal null} if * {@link #getShareNativeConnection() connection sharing} is disabled. */ @Nullable protected StatefulRedisConnection<byte[], byte[]> getSharedConnection() { return shareNativeConnection ? (StatefulRedisConnection) getOrCreateSharedConnection().getConnection() : null; }
/** * @return the shared connection using {@literal byte} array encoding for imperative API use. {@literal null} if * {@link #getShareNativeConnection() connection sharing} is disabled. */ @Nullable protected StatefulRedisConnection<byte[], byte[]> getSharedConnection() { return shareNativeConnection ? (StatefulRedisConnection) getOrCreateSharedConnection().getConnection() : null; }
@Override public RedisClusterConnection getClusterConnection() { if (!isClusterAware()) { throw new InvalidDataAccessApiUsageException("Cluster is not configured!"); } RedisClusterClient clusterClient = (RedisClusterClient) client; return getShareNativeConnection() ? new LettuceClusterConnection( (StatefulRedisClusterConnection<byte[], byte[]>) getOrCreateSharedConnection().getConnection(), connectionProvider, clusterClient, clusterCommandExecutor, clientConfiguration.getCommandTimeout()) : new LettuceClusterConnection(null, connectionProvider, clusterClient, clusterCommandExecutor, clientConfiguration.getCommandTimeout()); }