-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(statemachine): add current state fetcher for event verificatio…
…n and firing in StateMachine implementation Change-Id: Ifcfdaf68eae57a902ee7fff0d5e341085c45bf8b
- Loading branch information
Showing
6 changed files
with
114 additions
and
5 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...mponent-statemachine/src/main/java/com/alibaba/cola/statemachine/CurrentStateFetcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.alibaba.cola.statemachine; | ||
|
||
/** | ||
* CurrentStateFetcher is used to fetch the current state from the context | ||
* | ||
* @author Yanchi Zhang | ||
* @date 2024-12-09 11:21 AM | ||
*/ | ||
public interface CurrentStateFetcher<S, C> { | ||
|
||
/** | ||
* Fetch the current state from the context | ||
* | ||
* @param context the context | ||
* @return the current state | ||
*/ | ||
S currentState(C context); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters