@Private
@Unstable
public final class AuditingFunctions
extends java.lang.Object
withinX calls take a span and a closure/function etc.
and return a new function of the same types but which will
activate and the span.
They do not deactivate it afterwards to avoid accidentally deactivating
the already-active span during a chain of operations in the same thread.
All they do is ensure that the given span is guaranteed to be
active when the passed in callable/function/invokable is evaluated.| Modifier and Type | Method | Description |
|---|---|---|
static <T> java.util.concurrent.Callable<T> |
callableWithinAuditSpan(AuditSpan auditSpan,
java.util.concurrent.Callable<T> operation) |
Given a callable, return a new callable which
activates and deactivates the span around the inner invocation.
|
static <T> CallableRaisingIOE<T> |
withinAuditSpan(AuditSpan auditSpan,
CallableRaisingIOE<T> operation) |
Given a callable, return a new callable which
activates and deactivates the span around the inner invocation.
|
static <T,R> |
withinAuditSpan(AuditSpan auditSpan,
FunctionRaisingIOE<T,R> operation) |
Given a function, return a new function which
activates and deactivates the span around the inner one.
|
static InvocationRaisingIOE |
withinAuditSpan(AuditSpan auditSpan,
InvocationRaisingIOE operation) |
Given an invocation, return a new invocation which
activates and deactivates the span around the inner invocation.
|
public static <T> CallableRaisingIOE<T> withinAuditSpan(@Nullable AuditSpan auditSpan, CallableRaisingIOE<T> operation)
T - type of resultauditSpan - audit spanoperation - operationpublic static InvocationRaisingIOE withinAuditSpan(@Nullable AuditSpan auditSpan, InvocationRaisingIOE operation)
auditSpan - audit spanoperation - operationpublic static <T,R> FunctionRaisingIOE<T,R> withinAuditSpan(@Nullable AuditSpan auditSpan, FunctionRaisingIOE<T,R> operation)
T - Generics Type T.R - Generics Type R.auditSpan - audit spanoperation - operationpublic static <T> java.util.concurrent.Callable<T> callableWithinAuditSpan(@Nullable
AuditSpan auditSpan,
java.util.concurrent.Callable<T> operation)
T - type of resultauditSpan - audit spanoperation - operationCopyright © 2008–2025 Apache Software Foundation. All rights reserved.