mi::bridge::IClient_transaction Class Reference
[Bridge client]
Description
Represents the client side of a Bridge transaction. All data synchronization and job execution on the server requires a pair of client-side and server-side Bridge transactions. The lifetime of the server-side transaction is bound to the lifetime client-side transaction.
See also:
mi::bridge::IClient_scope::create_transaction()
Public Member Functions
- virtual Sint32 abort( IClient_transaction_callback* callback = 0) =0
- Aborts the Bridge transaction. More...
- virtual Sint32 commit( IClient_transaction_callback* callback = 0) =0
- Commits the Bridge transaction. More...
- virtual Sint32 execute( IClient_job* job) =0
- Schedules the provided job for execution on the server and returns immediately. More...
Member Functions
- virtual Sint32 mi::bridge::IClient_transaction::abort( IClient_transaction_callback* callback = 0) [pure virtual]
-
Aborts the Bridge transaction. Both, the client-side and server-side Bridge transaction will be aborted.
Note:The underlying local transaction mirrored by this client-side transaction will not be aborted automatically (unless it was created on-the-fly by mi::bridge::IClient_scope::create_transaction()). This is left to the user, e.g., one might do that at a later point in time, or abort the Bridge transaction while committing the underlying local transaction.
See also:
Parameters
- callback
- If the optional callback object is provided, then the call is asynchronous and the callback will be invoked when the abort is finished. Otherwise, the call is synchronous.
Returns
- 0: Aborted initiated successfully (non-blocking) or completed successfully (blocking).
- -1: Invalid transaction state (already committed or aborted).
- -2: Network error.
- <= -3: Unspecified error.
- virtual Sint32 mi::bridge::IClient_transaction::commit( IClient_transaction_callback* callback = 0) [pure virtual]
-
Commits the Bridge transaction. Both, the client-side and server-side Bridge transaction will be committed after all jobs executed on this transaction have been finished.
Note:The underlying local transaction mirrored by this client-side transaction will not be committed automatically (unless it was created on-the-fly by mi::bridge::IClient_scope::create_transaction()). This is left to the user, e.g., one might do that at a later point in time.
See also:
Parameters
- callback
- If the optional callback object is provided, then the call is asynchronous and the callback will be invoked when the commit is finished. Otherwise, the call is synchronous.
Returns
- 0: Commit initiated successfully (non-blocking) or completed successfully (blocking).
- -1: Invalid transaction state (already committed or aborted).
- -2: Network error.
- <= -3: Unspecified error.
- virtual Sint32 mi::bridge::IClient_transaction::execute( IClient_job* job) [pure virtual]
-
Schedules the provided job for execution on the server and returns immediately. Jobs are executed asynchronously, but sequentially (per transaction) on the server in the same order as execution is requested by this method. A job is only executed after its referenced database elements have been updated from the Bridge client to the Bridge server.
Parameters
- job
- The job to execute.
Returns
- 0: Success.
- -1: Invalid arguments (job is NULL).
- -2: Invalid transaction state (already committed or aborted).
- -3: Network error.
- -4: The job reference elements that can't be accessed.
- <= -5: Unspecified error.