@CleanupObligation @ParametersAreNonnullByDefault public interface ExecutionContext extends AutoCloseable, JsonWriteable
| Modifier and Type | Interface and Description |
|---|---|
static class |
ExecutionContext.Relation |
static interface |
ExecutionContext.Tag<T> |
writeJsonTo, writeJsonTo, writeTo@DischargesObligation void close()
close in interface AutoCloseabledefault void closeAll()
default void closeAllButRoot()
CharSequence getId()
long getStartTimeNanos()
long getDeadlineNanos()
@Nullable ExecutionContext getSource()
default ExecutionContext getRoot()
default ExecutionContext getRootParent()
@Nullable default ExecutionContext getNotClosedParent()
@Beta void addLog(Slf4jLogRecord log)
@Beta void addLogs(Collection<Slf4jLogRecord> log)
@Beta void addCloseable(AutoCloseable closeable)
closeable - @Beta Level getContextMinLogLevel(String loggerName)
default Level getContextMinLogLevel()
@Beta @Nullable Level getBackendMinLogLevel(String loggerName)
@Beta void streamLogs(Consumer<Slf4jLogRecord> to)
void detach()
void attach()
@Nonnegative default long getTimeToDeadline(TimeUnit unit) throws TimeoutException
TimeoutException@Nonnegative default long getUncheckedTimeToDeadline(TimeUnit unit)
@Nonnegative default long getMillisToDeadline() throws TimeoutException
TimeoutException@Nonnegative default int getSecondsToDeadline() throws TimeoutException
TimeoutException@Nullable @Beta <T> T get(ExecutionContext.Tag<T> key)
T - type of data.key - key of data.@Nullable @Beta <T> T put(ExecutionContext.Tag<T> tag, T data)
T - type of data.key - the key of data.data - the data.@Beta default <T> void combine(ExecutionContext.Tag<T> tag, T data)
@Nullable @Beta default <T> T putToRootParent(ExecutionContext.Tag<T> key, T data)
T - type of data.key - the key of data.data - the data.@Beta @Nullable <V> V compute(ExecutionContext.Tag<V> key, BiFunction<ExecutionContext.Tag<V>,V,V> compute)
K - V - key - compute - @Nullable @Beta default <T> List<T> add(ExecutionContext.Tag<List<T>> tag, T data)
@Nullable @Beta default <T> List<T> addToRootParent(ExecutionContext.Tag<List<T>> tag, T data)
default ExecutionContext startChild(String operationName, long timeout, TimeUnit tu)
default ExecutionContext startChild(String operationName)
default ExecutionContext detachedChild(String operationName, long timeout, TimeUnit tu)
default ExecutionContext detachedChild(String operationName)
long nextChildId()
void add(StackTraceElement[] sample)
void add(StackSamples samples)
@Nullable StackSamples getAndClearStackSamples()
@Nullable StackSamples getStackSamples()
boolean isClosed()
ExecutionContext.Relation getRelationToSource()
Copyright © 2019 SPF4J. All rights reserved.