-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Let OrchestratorFactory find Orchestrator by orchestratorId (#103)
* feat: OrchestratorFactory에서 orchestratorId로 Orchestrator를 찾을 수 있도록 한다 * fix: Rollback occurred even if no associated rollback found (#101) * feat: OrchestratorFactory에서 orchestratorId로 Orchestrator를 찾을 수 있도록 한다 * fix: upChainResult import
- Loading branch information
Showing
11 changed files
with
140 additions
and
66 deletions.
There are no files selected for viewing
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,40 @@ | ||
package org.rooftop.netx.api | ||
|
||
import org.rooftop.netx.engine.DefaultOrchestrateChain | ||
import reactor.core.publisher.Mono | ||
|
||
interface OrchestrateChain<OriginReq : Any, T : Any, V : Any> { | ||
|
||
fun <S : Any> join( | ||
function: OrchestrateFunction<V, S>, | ||
rollback: RollbackFunction<V, *>? = null, | ||
): DefaultOrchestrateChain<OriginReq, V, S> | ||
|
||
fun <S : Any> joinReactive( | ||
function: OrchestrateFunction<V, Mono<S>>, | ||
rollback: RollbackFunction<V, Mono<*>>? = null, | ||
): DefaultOrchestrateChain<OriginReq, V, S> | ||
|
||
fun <S : Any> commit( | ||
function: OrchestrateFunction<V, S>, | ||
rollback: RollbackFunction<V, *>? = null, | ||
): Orchestrator<OriginReq, S> | ||
|
||
fun <S : Any> commitReactive( | ||
function: OrchestrateFunction<V, Mono<S>>, | ||
rollback: RollbackFunction<V, Mono<*>>? = null, | ||
): Orchestrator<OriginReq, S> | ||
|
||
interface Pre<T : Any> { | ||
fun <V : Any> start( | ||
function: OrchestrateFunction<T, V>, | ||
rollback: RollbackFunction<T, *>? = null, | ||
): DefaultOrchestrateChain<T, T, V> | ||
|
||
fun <V : Any> startReactive( | ||
function: OrchestrateFunction<T, Mono<V>>, | ||
rollback: RollbackFunction<T, Mono<*>>? = null, | ||
): DefaultOrchestrateChain<T, T, V> | ||
|
||
} | ||
} |
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,9 @@ | ||
package org.rooftop.netx.api | ||
|
||
interface OrchestratorFactory { | ||
|
||
fun <T : Any, V : Any> get(orchestratorId: String): Orchestrator<T, V> | ||
|
||
fun <T : Any> create(orchestratorId: String): OrchestrateChain.Pre<T> | ||
|
||
} |
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
19 changes: 9 additions & 10 deletions
19
...oftop/netx/factory/OrchestratorFactory.kt → ...ooftop/netx/engine/OrchestratorFactory.kt
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
2 changes: 1 addition & 1 deletion
2
src/test/java/org/rooftop/netx/javasupports/OrchestratorConfigurer.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
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
Oops, something went wrong.