public void expire() { if (!compareAndSetState(ST_IN_BUCKET, ST_EXPIRED)) { assert state() != ST_INIT; return; } try { task.run(this); } catch (Throwable t) { if (logger.isWarnEnabled()) { logger.warn("An exception was thrown by " + TimerTask.class.getSimpleName() + '.', t); } } }
@Override public void run() { try { timerTask.run(timeout); } catch (Exception e) { Channels.fireExceptionCaught(channel.getNettyChannel(), e); } } });
public void expire() { if (!compareAndSetState(ST_IN_BUCKET, ST_EXPIRED)) { assert state() != ST_INIT; return; } try { task.run(this); } catch (Throwable t) { if (logger.isWarnEnabled()) { logger.warn("An exception was thrown by " + TimerTask.class.getSimpleName() + '.', t); } } }