@Preview(value="3.0")
public interface FlowContext
| Modifier and Type | Method and Description |
|---|---|
default <T> T |
computeIfAbsent(String key,
Function<String,T> mappingFunction)
尝试完成
|
default <C,R> org.noear.dami.bus.DamiBus<C,R> |
eventBus()
获取事件总线(based damibus)
|
default FlowExchanger |
exchanger()
交换器(只在任务执行时可获取)
|
ExecutorService |
executor()
异步执行器
|
FlowContext |
executor(ExecutorService executor)
配置异步执行器
|
default Object |
get(String key)
获取
|
default <T> T |
getAs(String key)
获取
|
default String |
getInstanceId()
获取流实例id
|
default <T> T |
getOrDefault(String key,
T def)
获取或默认
|
default int |
incrAdd(String key,
int delta)
增量添加
|
default int |
incrGet(String key)
增量获取
|
boolean |
isStateful()
是否为有状态的
|
Map<String,Object> |
model()
数据模型
|
static FlowContext |
of() |
static FlowContext |
of(String instanceId) |
static FlowContext |
of(String instanceId,
StateController stateController) |
static FlowContext |
of(String instanceId,
StateController stateController,
StateRepository stateRepository) |
default FlowContext |
put(String key,
Object value)
推入
|
default FlowContext |
putAll(Map<String,Object> model)
推入全部
|
default FlowContext |
putIfAbsent(String key,
Object value)
推入
|
default void |
remove(String key)
移除
|
StatefulSupporter |
statefulSupporter()
获取有状态的支持者
|
static FlowContext of()
static FlowContext of(String instanceId)
static FlowContext of(String instanceId, StateController stateController, StateRepository stateRepository)
static FlowContext of(String instanceId, StateController stateController)
@Preview(value="3.3") @Nullable ExecutorService executor()
@Preview(value="3.3") FlowContext executor(ExecutorService executor)
@Preview(value="3.5") @Nullable default FlowExchanger exchanger()
default String getInstanceId()
@Preview(value="3.5") boolean isStateful()
@Preview(value="3.5") StatefulSupporter statefulSupporter()
default <C,R> org.noear.dami.bus.DamiBus<C,R> eventBus()
default FlowContext put(String key, Object value)
default FlowContext putIfAbsent(String key, Object value)
default FlowContext putAll(Map<String,Object> model)
default <T> T getAs(String key)
default <T> T getOrDefault(String key, T def)
default int incrAdd(String key, int delta)
default int incrGet(String key)
default void remove(String key)
Copyright © 2025. All rights reserved.