-
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.
refactor: replace word transaction to saga (#120)
* refactor: replace word transaction to saga * build: netx version 0.3.8 to 0.3.9
- Loading branch information
Showing
81 changed files
with
1,721 additions
and
1,709 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.rooftop.netx.api | ||
|
||
class SagaCommitEvent internal constructor( | ||
id: String, | ||
nodeName: String, | ||
group: String, | ||
event: String?, | ||
codec: Codec, | ||
) : SagaEvent(id, nodeName, group, event, codec) { | ||
|
||
override fun copy(): SagaCommitEvent = | ||
SagaCommitEvent(id, nodeName, group, event, codec) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.rooftop.netx.api | ||
|
||
class SagaJoinEvent internal constructor( | ||
id: String, | ||
nodeName: String, | ||
group: String, | ||
event: String?, | ||
codec: Codec, | ||
) : SagaEvent(id, nodeName, group, event, codec) { | ||
|
||
override fun copy(): SagaJoinEvent = | ||
SagaJoinEvent(id, nodeName, group, event, codec) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.rooftop.netx.api | ||
|
||
import reactor.core.publisher.Mono | ||
|
||
interface SagaManager { | ||
|
||
fun start(): Mono<String> | ||
|
||
fun <T : Any> start(event: T): Mono<String> | ||
|
||
fun syncStart(): String | ||
|
||
fun <T : Any> syncStart(event: T): String | ||
|
||
fun join(id: String): Mono<String> | ||
|
||
fun <T : Any> join(id: String, event: T): Mono<String> | ||
|
||
fun syncJoin(id: String): String | ||
|
||
fun <T : Any> syncJoin(id: String, event: T): String | ||
|
||
fun exists(id: String): Mono<String> | ||
|
||
fun syncExists(id: String): String | ||
|
||
fun commit(id: String): Mono<String> | ||
|
||
fun <T : Any> commit(id: String, event: T): Mono<String> | ||
|
||
fun syncCommit(id: String): String | ||
|
||
fun <T : Any> syncCommit(id: String, event: T): String | ||
|
||
fun rollback(id: String, cause: String): Mono<String> | ||
|
||
fun <T : Any> rollback(id: String, cause: String, event: T): Mono<String> | ||
|
||
fun syncRollback(id: String, cause: String): String | ||
|
||
fun <T : Any> syncRollback(id: String, cause: String, event: T): String | ||
|
||
} |
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,14 @@ | ||
package org.rooftop.netx.api | ||
|
||
class SagaRollbackEvent internal constructor( | ||
id: String, | ||
nodeName: String, | ||
group: String, | ||
event: String?, | ||
val cause: String, | ||
codec: Codec, | ||
) : SagaEvent(id, nodeName, group, event, codec) { | ||
|
||
override fun copy(): SagaRollbackEvent = | ||
SagaRollbackEvent(id, nodeName, group, event, cause, codec) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.rooftop.netx.api | ||
|
||
class SagaStartEvent internal constructor( | ||
id: String, | ||
nodeName: String, | ||
group: String, | ||
event: String?, | ||
codec: Codec, | ||
) : SagaEvent(id, nodeName, group, event, codec) { | ||
|
||
override fun copy(): SagaStartEvent = | ||
SagaStartEvent(id, nodeName, group, event, codec) | ||
} |
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
13 changes: 0 additions & 13 deletions
13
src/main/kotlin/org/rooftop/netx/api/TransactionCommitEvent.kt
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
src/main/kotlin/org/rooftop/netx/api/TransactionJoinEvent.kt
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
src/main/kotlin/org/rooftop/netx/api/TransactionManager.kt
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
src/main/kotlin/org/rooftop/netx/api/TransactionRollbackEvent.kt
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
src/main/kotlin/org/rooftop/netx/api/TransactionStartEvent.kt
This file was deleted.
Oops, something went wrong.
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.