protected Runnable wrapRunnable(Runnable command) { return contextHolder.preserveContext(command); }
public Runnable preserveContext(Runnable command) { return getThreadContext().preserveContext(command); }
helper.retryWithContext = threadPool.getThreadContext().preserveContext(helper); helper.run();
protected Runnable wrapRunnable(Runnable command) { return contextHolder.preserveContext(command); }
protected Runnable wrapRunnable(Runnable command) { return contextHolder.preserveContext(command); }
protected Runnable wrapRunnable(Runnable command) { return contextHolder.preserveContext(command); }
public Runnable preserveContext(Runnable command) { return getThreadContext().preserveContext(command); }
public Runnable preserveContext(Runnable command) { return getThreadContext().preserveContext(command); }
private void retry(BulkRequest bulkRequestForRetry) { assert backoff.hasNext(); TimeValue next = backoff.next(); logger.trace("Retry of bulk request scheduled in {} ms.", next.millis()); Runnable retry = () -> this.execute(bulkRequestForRetry); retry = client.threadPool().getThreadContext().preserveContext(retry); scheduledRequestFuture = client.threadPool().schedule(next, ThreadPool.Names.SAME, retry); }
helper.retryWithContext = threadPool.getThreadContext().preserveContext(helper); helper.run();
helper.retryWithContext = threadPool.getThreadContext().preserveContext(helper); helper.run();
helper.retryWithContext = threadPool.getThreadContext().preserveContext(helper); helper.run();
prepareBulkRequestRunnable = (AbstractRunnable) threadPool.getThreadContext().preserveContext(prepareBulkRequestRunnable); worker.delayPrepareBulkRequest(threadPool, lastBatchStartTime, lastBatchSize, prepareBulkRequestRunnable);