/** * Whether we have been stopped, ie are stopping are or fully stopped, * in which case will not persist or store anything * (except for a final internal persistence called while STOPPING.) */ private boolean isStopped() { return state == ListenerState.STOPPING || state == ListenerState.STOPPED || executionContext.isShutdown(); }