public class RedisStateRepository<T extends StateRecord> extends Object implements StateRepository<T>
| Constructor and Description |
|---|
RedisStateRepository(org.noear.redisx.RedisClient client) |
RedisStateRepository(org.noear.redisx.RedisClient client,
String statePrefix,
String recordPrefix) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStateRecord(FlowContext context,
T record)
添加状态记录
|
void |
clearState(FlowContext context)
清空
|
void |
clearStateRecords(FlowContext context)
清空状态记录
|
int |
getState(FlowContext context,
Node node)
获取状态
|
List<T> |
getStateRecords(FlowContext context)
获取状态记录
|
void |
putState(FlowContext context,
Node node,
int nodeState)
推入状态
|
void |
removeState(FlowContext context,
Node node)
移除状态
|
public RedisStateRepository(org.noear.redisx.RedisClient client)
public int getState(FlowContext context, Node node)
StateRepositorygetState in interface StateRepository<T extends StateRecord>public void putState(FlowContext context, Node node, int nodeState)
StateRepositoryputState in interface StateRepository<T extends StateRecord>public void removeState(FlowContext context, Node node)
StateRepositoryremoveState in interface StateRepository<T extends StateRecord>public void clearState(FlowContext context)
StateRepositoryclearState in interface StateRepository<T extends StateRecord>public List<T> getStateRecords(FlowContext context)
StateRepositorygetStateRecords in interface StateRepository<T extends StateRecord>public void addStateRecord(FlowContext context, @Nullable T record)
StateRepositoryaddStateRecord in interface StateRepository<T extends StateRecord>public void clearStateRecords(FlowContext context)
StateRepositoryclearStateRecords in interface StateRepository<T extends StateRecord>Copyright © 2025. All rights reserved.