@Test public void delegatesClusterConnectionIfCluster() { RedisConnectionFactory connectionFactory = mock(RedisConnectionFactory.class); when(connectionFactory.getConnection()).thenReturn(mock(RedisClusterConnection.class)); TracingRedisConnectionFactory tracingConnectionFactory = new TracingRedisConnectionFactory( connectionFactory, new TracingConfiguration.Builder(tracer).traceWithActiveSpanOnly(false).build()); assertTrue(tracingConnectionFactory.getConnection() instanceof RedisClusterConnection); }
@Override public RedisConnection getConnection() { RedisConnection connection = this.delegate.getConnection(); if (connection instanceof RedisClusterConnection) { return new TracingRedisClusterConnection((RedisClusterConnection) connection, tracingConfiguration); } return new TracingRedisConnection(connection, tracingConfiguration); }
TracingRedisConnectionFactory implements RedisConnectionFactory,
    ReactiveRedisConnectionFactory { @Override public RedisConnection getConnection() { RedisConnection connection = this.delegate.getConnection(); if (connection instanceof RedisClusterConnection) { return new TracingRedisClusterConnection((RedisClusterConnection) connection, tracingConfiguration); } return new TracingRedisConnection(connection, tracingConfiguration); } }
TracingRedisConnectionFactory implements RedisConnectionFactory,
    ReactiveRedisConnectionFactory { @Override public RedisConnection getConnection() { RedisConnection connection = this.delegate.getConnection(); if (connection instanceof RedisClusterConnection) { return new TracingRedisClusterConnection((RedisClusterConnection) connection, tracingConfiguration); } return new TracingRedisConnection(connection, tracingConfiguration); } TracingRedisConnectionFactory(RedisConnectionFactory delegate,
      TracingConfiguration tracingConfiguration); }
TracingRedisConnectionFactory implements RedisConnectionFactory,
    ReactiveRedisConnectionFactory { @Override public RedisConnection getConnection() { RedisConnection connection = this.delegate.getConnection(); if (connection instanceof RedisClusterConnection) { return new TracingRedisClusterConnection((RedisClusterConnection) connection, tracingConfiguration); } return new TracingRedisConnection(connection, tracingConfiguration); } TracingRedisConnectionFactory(RedisConnectionFactory delegate,
      TracingConfiguration tracingConfiguration); @Override RedisConnection getConnection(); @Override RedisClusterConnection getClusterConnection(); @Override boolean getConvertPipelineAndTxResults(); @Override RedisSentinelConnection getSentinelConnection(); @Override DataAccessException translateExceptionIfPossible(RuntimeException e); @Override ReactiveRedisConnection getReactiveConnection(); @Override ReactiveRedisClusterConnection getReactiveClusterConnection(); }
TracingRedisConnectionFactory implements RedisConnectionFactory,
    ReactiveRedisConnectionFactory { @Override public RedisConnection getConnection() { RedisConnection connection = this.delegate.getConnection(); if (connection instanceof RedisClusterConnection) { return new TracingRedisClusterConnection((RedisClusterConnection) connection, tracingConfiguration); } return new TracingRedisConnection(connection, tracingConfiguration); } TracingRedisConnectionFactory(RedisConnectionFactory delegate,
      TracingConfiguration tracingConfiguration); @Override RedisConnection getConnection(); @Override RedisClusterConnection getClusterConnection(); @Override boolean getConvertPipelineAndTxResults(); @Override RedisSentinelConnection getSentinelConnection(); @Override DataAccessException translateExceptionIfPossible(RuntimeException e); @Override ReactiveRedisConnection getReactiveConnection(); @Override ReactiveRedisClusterConnection getReactiveClusterConnection();  }