@ExperimentalApi
public interface SpanningOperationRunner
| Modifier and Type | Method and Description |
|---|---|
void |
execute(SpanningOperation spanningOperation,
Runnable runnable)
Allows marking events generated by passed
runnable with passed surroundingOperation
Current implementation allows setting spanning operation for current thread only. |
<T> T |
execute(SpanningOperation spanningOperation,
java.util.function.Supplier<T> supplier)
Allows marking events generated by passed
callable with passed surroundingOperation. |
<T> T |
executeCallable(SpanningOperation spanningOperation,
Callable<T> callable)
Allows marking events generated by passed
callable with passed surroundingOperation. |
<T> T execute(@Nonnull SpanningOperation spanningOperation, @Nonnull java.util.function.Supplier<T> supplier)
callable with passed surroundingOperation.
Current implementation allows setting spanning operation for current thread only.
If some other thread is spawned in the passed callable then spanning operation has to be set up for the newly started thread.
Currently only events that implement SpanningOperationEvent are affected by this method.T - Type of returned objectspanningOperation - Operation that spans over passed suppliersupplier - Set of instructions executed in the context of spanning operationsuppliervoid execute(@Nonnull SpanningOperation spanningOperation, @Nonnull Runnable runnable)
runnable with passed surroundingOperation
Current implementation allows setting spanning operation for current thread only.
If some other thread is spawned in the passed runnable then spanning operation has to be set up for the newly started thread.
Currently only events that implement SpanningOperationEvent are affected by this method.spanningOperation - Operation that spans over passed runnablerunnable - <T> T executeCallable(@Nonnull SpanningOperation spanningOperation, @Nonnull Callable<T> callable)
callable with passed surroundingOperation.
Current implementation allows setting spanning operation for current thread only.
If some other thread is spawned in the passed callable then spanning operation has to be set up for the newly started thread.
Currently only events that implement SpanningOperationEvent are affected by this method.
Exceptions thrown by callable are converted to RuntimeException and re-thrown.T - Type of returned objectspanningOperation - Operation that spans over passed callablecallable - Set of instructions executed in the context of spanning operationcallableCopyright © 2002-2022 Atlassian. All Rights Reserved.