use of com.ctrip.xpipe.concurrent.AbstractExceptionLogTask in project x-pipe by ctripcorp.
the class LettuceTest method connectUntilConnected.
protected void connectUntilConnected(RedisClient redisClient) {
scheduled.schedule(new AbstractExceptionLogTask() {
@Override
protected void doRun() throws Exception {
try {
doConnect(redisClient);
} catch (Exception e) {
connectUntilConnected(redisClient);
logger.error("[doRun][reconnect]", e);
}
}
}, 5, TimeUnit.SECONDS);
}
Aggregations