Class ScopedLogContext.Carrier
java.lang.Object
cloud.opencode.base.log.enhance.ScopedLogContext.Carrier
- Enclosing class:
ScopedLogContext
Carrier for binding multiple values and executing tasks
用于绑定多个值和执行任务的载体
- Since:
- JDK 25, opencode-base-log V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionand(ScopedValue<String> key, String value) Adds another binding 添加另一个绑定<T> TCalls a task in this context 在此上下文中调用任务voidRuns a task in this context 在此上下文中运行任务Gets the underlying carrier 获取底层载体
-
Method Details
-
and
Adds another binding 添加另一个绑定- Parameters:
key- the scoped value key | 作用域值键value- the value to bind | 要绑定的值- Returns:
- this carrier for chaining | 用于链式调用的此载体
-
run
Runs a task in this context 在此上下文中运行任务- Parameters:
task- the task to run | 要运行的任务
-
call
-
underlying
Gets the underlying carrier 获取底层载体- Returns:
- the ScopedValue carrier | ScopedValue 载体
-