@ThreadSafe @ParametersAreNonnullByDefault public class BasicExecutionContext extends Object implements ExecutionContext
| Constructor and Description |
|---|
BasicExecutionContext(String name,
ExecutionContext parent,
long startTimeNanos,
long deadlineNanos,
Runnable onClose) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close might be overridable to close any additional stuff added in the extendsd class.
|
<K,V> V |
compute(K key,
BiFunction<K,V,V> compute)
Compute context associated data.
|
Object |
get(Object key)
Method to get context associated data.
|
long |
getDeadlineNanos() |
String |
getName() |
ExecutionContext |
getParent() |
long |
getStartTimeNanos() |
<T> T |
put(Object key,
T data)
Method to put context associated data.
|
String |
toString()
Overwrite as needed for debug string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitget, getMillisToDeadline, getSecondsToDeadline, getTimeRelativeToDeadline, getTimeToDeadline, getUncheckedTimeToDeadline, putToRootpublic BasicExecutionContext(String name, @Nullable ExecutionContext parent, long startTimeNanos, long deadlineNanos, Runnable onClose)
public final String getName()
getName in interface ExecutionContextpublic final long getDeadlineNanos()
getDeadlineNanos in interface ExecutionContextpublic final long getStartTimeNanos()
getStartTimeNanos in interface ExecutionContext@Nullable @Beta public final <T> T put(@Nonnull Object key, @Nonnull T data)
ExecutionContextput in interface ExecutionContextT - type of data.key - the key of data.data - the data.@Nullable @Beta public final Object get(@Nonnull Object key)
ExecutionContextget in interface ExecutionContextkey - key of data.@Nullable public final <K,V> V compute(@Nonnull K key, BiFunction<K,V,V> compute)
ExecutionContextcompute in interface ExecutionContextpublic final ExecutionContext getParent()
getParent in interface ExecutionContextpublic void close()
close in interface AutoCloseableclose in interface ExecutionContextCopyright © 2018 SPF4J. All rights reserved.