Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The examples of declaring that repository and the dependency on this package in
<dependency>
<groupId>io.github.sttk</groupId>
<artifactId>sabi</artifactId>
<version>0.8.0</version>
<version>1.0.0</version>
</dependency>
</dependencies>
```
Expand All @@ -68,7 +68,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'io.github.sttk:sabi:0.8.0'
implementation 'io.github.sttk:sabi:1.0.0'
}
```

Expand Down Expand Up @@ -254,9 +254,9 @@ This program is free software under MIT License.<br>
See the file LICENSE in this distribution for more details.


[mvn-img]: https://img.shields.io/badge/maven_central-0.8.0-276bdd.svg
[mvn-url]: https://central.sonatype.com/artifact/io.github.sttk/sabi/0.8.0
[mvnrepo-img]: https://img.shields.io/badge/mvn_repository-0.8.0-498df4.svg
[mvn-img]: https://img.shields.io/badge/maven_central-1.0.0-276bdd.svg
[mvn-url]: https://central.sonatype.com/artifact/io.github.sttk/sabi/1.0.0
[mvnrepo-img]: https://img.shields.io/badge/mvn_repository-1.0.0-498df4.svg
[mvnrepo-url]: https://mvnrepository.com/artifact/io.github.sttk/sabi
[io-img]: https://img.shields.io/badge/github.io-Javadoc-4d7a97.svg
[io-url]: https://sttk.github.io/sabi-java/
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/AsyncGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* <p>All registered {@link Runner} tasks are managed by this group and executed asynchronously. If
* any registered task fails, is interrupted, or throws an unhandled runtime exception,
* corresponding error records defined in this interface are produced to report the failure.
*
* @since 1.0
*/
public sealed interface AsyncGroup permits AsyncGroupImpl {

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/DataAcc.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* specific names within a data access scope (such as a {@link DataHub}). Application business logic
* uses this interface to obtain connection objects required to perform database or external service
* operations.
*
* @since 1.0
*/
public interface DataAcc {

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/DataConn.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* relational databases, NoSQL stores, or web services. During a transaction, connections progress
* through pre-commit, commit, and post-commit phases, and support rollback and failure reporting
* when errors occur.
*
* @since 1.0
*/
public interface DataConn {

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/DataHub.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* {@link #run(Logic)} for non-transactional operations and {@link #txn(Logic)} for transactional
* operations. In a transaction, connection commits, rollbacks, and failure reporting are handled
* automatically.
*
* @since 1.0
*/
public class DataHub implements DataAcc, AutoCloseable {

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/DataSrc.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* for specific data stores or external services (such as relational databases, HTTP clients, or
* caching services). Data sources can be registered globally via {@link Sabi#uses(String, DataSrc)}
* or bound locally to a {@link DataHub}.
*
* @since 1.0
*/
public interface DataSrc {

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/ErrEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* <p>Instances of this class record the positional index, logical name, and cause of an error when
* batch operations (such as global/local data source setup or connection pre-commit, commit, and
* post-commit phases) encounter errors across multiple connections.
*
* @since 1.0
*/
public class ErrEntry {

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/Logic.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* interface {@code data} gives access to data connections and resources needed during execution.
*
* @param <D> the type of data access interface passed to the logic execution method
*
* @since 1.0
*/
@FunctionalInterface
public interface Logic<D> {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* <p>Tasks implementing this interface are added to an {@link AsyncGroup} (via {@link
* AsyncGroup#add(Runner)}) during data source or data connection lifecycle events (such as setup,
* commit, or rollback) to perform parallel background processing.
*
* @since 1.0
*/
@FunctionalInterface
public interface Runner {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/Sabi.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* startup, and then call {@link #setup()} or {@link #setup(String...)} to set them up. The returned
* {@link AutoCloseable} handles shutting down and closing global data sources when the application
* terminates or finishes using them.
*
* @since 1.0
*/
public final class Sabi {
private Sabi() {}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/TxnFailureCause.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*
* <p>This class encapsulates the phase or status in which a transaction failure occurred (via
* {@link TxnFailureCauseState}) and the specific {@link Err} instance detailing the failure.
*
* @since 1.0
*/
public class TxnFailureCause {

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/github/sttk/sabi/TxnFailureCauseState.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
*/
package com.github.sttk.sabi;

/** Defines the states representing causes of transaction failures or successful states. */
/**
* Defines the states representing causes of transaction failures or successful states.
*
* @since 1.0
*/
public enum TxnFailureCauseState {

/** Indicates no failure occurred and the connection was committed successfully. */
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/github/sttk/sabi/TxnFailureRecovery.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
*/
package com.github.sttk.sabi;

/** Defines recommended recovery actions to handle transaction failures. */
/**
* Defines recommended recovery actions to handle transaction failures.
*
* @since 1.0
*/
public enum TxnFailureRecovery {

/** Indicates that no recovery action is required. */
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/TxnFailureReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* and passed to {@link DataConn#onTxnFailure(AsyncGroup, java.util.List)}. It details the
* connection's name, type, failure cause ({@link TxnFailureCause}), and rollback status ({@link
* TxnFailureRollback}), and provides methods to determine recommended recovery strategies.
*
* @since 1.0
*/
public class TxnFailureReport {

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/sttk/sabi/TxnFailureRollback.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*
* <p>This class encapsulates the state of the rollback (via {@link TxnFailureRollbackState}) and
* any error ({@link Err}) encountered when attempting to roll back the connection.
*
* @since 1.0
*/
public class TxnFailureRollback {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
*/
package com.github.sttk.sabi;

/** Defines the states representing outcomes of transaction rollback attempts. */
/**
* Defines the states representing outcomes of transaction rollback attempts.
*
* @since 1.0
*/
public enum TxnFailureRollbackState {

/** Indicates that the connection was successfully rolled back without error. */
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/github/sttk/sabi/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/**
* Provides core interfaces and classes for the sabi framework.
*
* @version 0.8
* @version 1.0
* @since 1.0
*/
package com.github.sttk.sabi;
2 changes: 1 addition & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* manage data source and connection lifecycles, and execute logic functions in transactional or
* non-transactional scopes.
*
* @version 0.8
* @version 1.0
*/
module com.github.sttk.sabi {
exports com.github.sttk.sabi;
Expand Down
Loading