Class LogContext.ContextSnapshot
java.lang.Object
cloud.opencode.base.log.context.LogContext.ContextSnapshot
- Enclosing class:
LogContext
Context Snapshot - Immutable snapshot for async propagation.
上下文快照 - 用于异步传播的不可变快照。
- Since:
- JDK 25, opencode-base-log V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionContextSnapshot(Map<String, String> mdcContext) Creates a new context snapshot. -
Method Summary
-
Constructor Details
-
ContextSnapshot
-
-
Method Details
-
mdcContext
-
runWith
Executes a task with this context. 使用此上下文执行任务。- Parameters:
runnable- the task - 任务
-
callWith
Executes a task with this context and returns the result. 使用此上下文执行任务并返回结果。- Type Parameters:
T- the result type - 结果类型- Parameters:
supplier- the task - 任务- Returns:
- the result - 结果
-
equals
-
hashCode
-
toString
-