void setPeriodicExecutionCancellationCallback(Runnable periodicExecutionCancellation) {
        synchronized (monitor) {
            if (cancelled) {
                throw new IllegalStateException("Cancellation callback set after cancel()");
            }

            this.periodicExecutionCancellation = Optional.of(periodicExecutionCancellation);
        }
    }
Provide a way for {@code this} to cancel the periodic execution of {@link #run()}.

<p>Must be called happens-before {@link #cancel()}.
service-monitor/src/main/java/com/yahoo/vespa/service/executor/CancellableImpl.java