private void runAppender() { lifeCycle.transition(RUNNING); try { runAppenderImpl(); } catch (InterruptedException | InterruptedIOException e) { LOG.info(this + " was interrupted: " + e); } catch (IOException e) { LOG.error(this + " hit IOException while loading raft log", e); lifeCycle.transition(EXCEPTION); } catch (Throwable e) { LOG.error(this + " unexpected exception", e); lifeCycle.transition(EXCEPTION); } finally { if (!lifeCycle.compareAndTransition(CLOSING, CLOSED)) { lifeCycle.transition(EXCEPTION); } } }
private void runAppender() { lifeCycle.transition(RUNNING); try { runAppenderImpl(); } catch (InterruptedException | InterruptedIOException e) { LOG.info(this + " was interrupted: " + e); } catch (IOException e) { LOG.error(this + " hit IOException while loading raft log", e); lifeCycle.transition(EXCEPTION); } catch (Throwable e) { LOG.error(this + " unexpected exception", e); lifeCycle.transition(EXCEPTION); } finally { if (!lifeCycle.compareAndTransition(CLOSING, CLOSED)) { lifeCycle.transitionIfNotEqual(EXCEPTION); } } }