-
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: sagaManager's sync... method to ...sync * docs: Write dokka doc
- Loading branch information
Showing
54 changed files
with
787 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
dokkaHtml { | ||
outputDirectory.set(file("build/documentation/html")) | ||
} | ||
|
||
dokkaGfm { | ||
outputDirectory.set(file("build/documentation/markdown")) | ||
} | ||
|
||
tasks.register('dokkaHtmlJar', Jar.class) { | ||
dependsOn(dokkaHtml) | ||
from(dokkaHtml) | ||
archiveClassifier.set("html-docs") | ||
} | ||
|
||
tasks.register('dokkaJavadocJar', Jar.class) { | ||
dependsOn(dokkaJavadoc) | ||
from(dokkaJavadoc) | ||
archiveClassifier.set("javadoc") | ||
} |
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
15 changes: 15 additions & 0 deletions
15
src/main/kotlin/org/rooftop/netx/api/ContextOrchestrate.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
package org.rooftop.netx.api | ||
|
||
/** | ||
* An interface for accessing the Context maintained in each Orchestrator saga. | ||
* | ||
* @see Orchestrate | ||
* @see Context | ||
* @see Orchestrator | ||
*/ | ||
fun interface ContextOrchestrate<T : Any, V : Any> : TypeReified<T> { | ||
|
||
/** | ||
* Passes the context with the request to orchestrate. | ||
* | ||
* @see Orchestrate.orchestrate | ||
*/ | ||
fun orchestrate(context: Context, request: T): V | ||
|
||
/** | ||
* @see Orchestrate.reified | ||
*/ | ||
override fun reified(): TypeReference<T>? = null | ||
} |
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 |
---|---|---|
@@ -1,8 +1,23 @@ | ||
package org.rooftop.netx.api | ||
|
||
/** | ||
* An interface for accessing the Context maintained in each Orchestrator saga. | ||
* | ||
* @see Orchestrate | ||
* @see Context | ||
* @see Orchestrator | ||
*/ | ||
fun interface ContextRollback<T : Any, V : Any?> : TypeReified<T> { | ||
|
||
/** | ||
* Passes the context with the request to orchestrate. | ||
* | ||
* @see Rollback.rollback | ||
*/ | ||
fun rollback(context: Context, request: T): V | ||
|
||
/** | ||
* @see Rollback.reified | ||
*/ | ||
override fun reified(): TypeReference<T>? = null | ||
} |
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 |
---|---|---|
@@ -1,8 +1,28 @@ | ||
package org.rooftop.netx.api | ||
|
||
/** | ||
* Unit of operation for Orchestrator. | ||
* | ||
* Orchestrate is guaranteed to be executed at least once under any circumstances. | ||
* | ||
* @see Orchestrator | ||
*/ | ||
fun interface Orchestrate<T : Any, V : Any> : TypeReified<T> { | ||
|
||
/** | ||
* Takes a request and responds with the result of orchestration. | ||
* | ||
* The result of orchestration is passed to the subsequent orchestrate. | ||
* | ||
* @param T request type of Orchestrate | ||
* @param V response type of Orchestrate | ||
*/ | ||
fun orchestrate(request: T): V | ||
|
||
|
||
/** | ||
* If the request parameter includes generics such as List<Foo>, this function must be implemented. | ||
* | ||
* Generics prevent type inference, so this function relies on the return value of the reified function to decode and pass the request. | ||
*/ | ||
override fun reified(): TypeReference<T>? = null | ||
} |
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/OrchestrateRequest.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.