@ManagedOperation
    public void stop() {
        // non atomic state change
        if(!(state.compareAndSet(PAUSED, STOPPED) || state.compareAndSet(RUNNING, STOPPED))) {
            throw new IllegalStateException("Unable to resume service with state " + state);
        }
    }