code: public void setTimeout(ScheduledExecutorService timeoutExecutor, long timeout, TimeUnit unit) {
        cancelTimeoutTask();
        ScheduledFuture<Void> timeoutFuture = timeoutExecutor.schedule(this, timeout, unit);
        setTimeoutFuture(timeoutFuture);
     }
docs: Schedule a timeout task on the given executor, and complete the request with a {@link
  org.infinispan.util.concurrent.TimeoutException}
  when the task runs.
  
  If a timeout task was already registered with this request, it is cancelled.