Search in sources :

Example 1 with ReconnectListener

use of org.redisson.client.ReconnectListener in project redisson by redisson.

the class ClientConnectionsEntry method addReconnectListener.

private <T extends RedisConnection> void addReconnectListener(RPromise<T> connectionFuture, T conn) {
    addFireEventListener(conn, connectionFuture);
    conn.setReconnectListener(new ReconnectListener() {

        @Override
        public void onReconnect(RedisConnection conn, RPromise<RedisConnection> connectionFuture) {
            addFireEventListener(conn, connectionFuture);
        }
    });
}
Also used : ReconnectListener(org.redisson.client.ReconnectListener) RedisConnection(org.redisson.client.RedisConnection)

Aggregations

ReconnectListener (org.redisson.client.ReconnectListener)1 RedisConnection (org.redisson.client.RedisConnection)1