/** * @param executor The executor on which to run the callback * @param orderingKey Key used to decide which thread the callback * should run on. */ public OrderedGenericCallback(OrderedExecutor executor, long orderingKey) { this.executor = executor; this.orderingKey = orderingKey; this.mdcContextMap = executor.preserveMdc() ? MDC.getCopyOfContextMap() : null; }