public interface DaxConn
DaxConn
is the interface that represents a connection to a data store.
This interface declares methods: commit(com.github.sttk.sabi.AsyncGroup)
, rollback(com.github.sttk.sabi.AsyncGroup)
and
close()
to
work in a transaction
process.
commit(com.github.sttk.sabi.AsyncGroup)
is the method for comming updates in a transaction.
rollback(com.github.sttk.sabi.AsyncGroup)
is the method for rollback updates in a transaction.
If commiting and rollbacking procedures are asynchronous, the argument
AsyncGroup
(s) are used to process them.
close()
is the method to close this connection.-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this connection.void
commit
(AsyncGroup ag) Commits updates to a target data store in a transaction.void
forceBack
(AsyncGroup ag) Reverts updates forcely even if updates are already commited or this connection does not have rollback mechanism.default boolean
Checks whether updates are already committed.default void
rollback
(AsyncGroup ag) Rollbacks updates to a target data store in a transaction.
-
Method Details
-
commit
Commits updates to a target data store in a transaction. If the commit procedure is asynchronous, it is processed with an argumentAsyncGroup
object.- Parameters:
ag
- AnAsyncGroup
object which is used if this commit procedure is asynchronous.- Throws:
Err
- If commiting updates fails.
-
isCommitted
default boolean isCommitted()Checks whether updates are already committed.- Returns:
- true if committed, or no rollback mechanism.
-
rollback
Rollbacks updates to a target data store in a transaction. If the rollback procedure is asynchronous, it is processed with an argumentAsyncGroup
object.- Parameters:
ag
- AnAsyncGroup
object which is used if this rollback procedure is asynchronous.
-
forceBack
Reverts updates forcely even if updates are already commited or this connection does not have rollback mechanism.- Parameters:
ag
- AnAsyncGroup
object which is used if this rollback procedure is asynchronous.
-
close
void close()Closes this connection.
-