NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::bridge::IClient_transaction Class Referenceabstract

Represents the client side of a Bridge transaction. More...

Inheritance diagram for mi::bridge::IClient_transaction:
Inheritance graph
[legend]

Public Member Functions

virtual Sint32  execute (IClient_job *job)=0
  Schedules the provided job for execution on the server and returns immediately. More...
 
virtual Sint32  commit (IClient_transaction_callback *callback=0)=0
  Commits the Bridge transaction. More...
 
virtual Sint32  abort (IClient_transaction_callback *callback=0)=0
  Aborts the Bridge transaction. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x5820ed8e, 0xe2c6, 0x4a35, 0xa1, 0xd4, 0xc4, 0x82, 0x87, 0x16, 0xe0, 0x36 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x5820ed8e, 0xe2c6, 0x4a35, 0xa1, 0xd4, 0xc4, 0x82, 0x87, 0x16, 0xe0, 0x36 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed 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()

Member Function Documentation

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
commit()
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
abort()
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.