@Override
    @StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
    public void start() {
        if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
            if (state.get().isRunning()) {
                // then it's ok. It's already running
                return;
            } else {
                // this is problematic. There are still active threads pending a shutdown.
                throw new IllegalStateException("Cannot start this processor. It is pending shutdown...");
            }
        }
        State previousState = state.getAndSet(State.STARTED);
        if (!previousState.isRunning()) {
            startSegmentWorkers();
        }
    }
@Override
    @StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
    public void start() {
        if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
            if (state.get().isRunning()) {
               
                return;
            } else {
               
                throw new IllegalStateException("Cannot start this processor. It is pending shutdown...");
            }
        }
        State previousState = state.getAndSet(State.STARTED);
        if (!previousState.isRunning()) {
            startSegmentWorkers();
        }
    }
@override @starthandler(phase = phase.inbound_event_connectors) public void start() { if (activeprocessorthreads() > 0 || worklauncherrunning.get()) { if (state.get().isrunning()) { return; } else { throw new illegalstateexception("cannot start this processor. it is pending shutdown..."); } } state previousstate = state.getandset(state.started); if (!previousstate.isrunning()) { startsegmentworkers(); } }