feat: 新增并发型状态机(基于CAS实现, 未完成).

This commit is contained in:
2025-02-06 11:11:25 +08:00
parent ad26f59438
commit 52946be558
7 changed files with 171 additions and 0 deletions

View File

@@ -253,6 +253,9 @@ public final class StateMachineBuilder<S> {
if (type.equals(StateMachineType.STANDARD)) {
return (M)new StandardStateMachine<>(stateList, entryHandlers,
leaveHandlers, exchangeHandlers, eventRegistries, executor, async);
} else if (type.equals(StateMachineType.CONCURRENT)) {
return (M)new DefaultConcurrentStateMachine<>(stateList, entryHandlers,
leaveHandlers, exchangeHandlers, eventRegistries, executor, async);
}
throw new IllegalArgumentException("未知的状态机类型: " + type);
}