class ReactorSerializedInvoker {

    public void shutdown(Duration timeout) {
        if (shutdownFlag) {
            return;
        }

        this.shutdownFlag = true;
        MonoProcessor<Void> marker = MonoProcessor.create();
        worker.schedule(this::drainOnShutdown);
        worker.schedule(marker::onComplete);

        try {
            marker.block(timeout);
        } catch (Exception ignoreTimeout) {
        } finally {
            worker.dispose();
        }
    }

    private  ReactorSerializedInvoker(String name,
                                     int size,
                                     Duration excessiveRunningTime,
                                     Scheduler scheduler,
                                     Registry registry,
                                     Clock clock);

}