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);
}
});
}
Aggregations