APISonar


io.lettuce.core.cluster.api.StatefulRedisClusterConnection.time

> io > lettuce > core > cluster > api > StatefulRedisClusterConnection > time
io APIs lettuce APIs core APIs cluster APIs api APIs StatefulRedisClusterConnection APIs time APIs

Example 1
private StatefulRedisClusterConnection<String, String> connection;

    void closeConnection() {

        RedisAdvancedClusterCommands<String, String> connection = clusterClient.connect().sync();

        List<String> time = connection.time();
        assertThat(time).hasSize(2);

        connection.getStatefulConnection().close();

        assertThatThrownBy(connection::time).isInstanceOf(RedisException.class);
    }