Represents the server side of a Bridge transaction. More...
Public Member Functions | |
virtual IServer_session * | get_session () const =0 |
Returns the session of the transaction. More... |
|
virtual neuraylib::ITransaction * | get_database_transaction () const =0 |
Returns the local transaction corresponding to this Bridge transaction. More... |
|
template<class T > | |
T * | get_database_transaction () const |
Returns the local transaction corresponding to this Bridge transaction. More... |
|
virtual Sint32 | add_transaction_callback (IServer_transaction_callback *callback)=0 |
Adds a transaction callback. More... |
|
virtual Sint32 | remove_transaction_callback (IServer_transaction_callback *callback)=0 |
Removes a transaction callback. More... |
|
virtual Sint32 | create_snapshot (const char *element, IString *snapshot_id)=0 |
Creates a snapshot of some database elements. More... |
|
virtual Sint32 | create_incremental_snapshot_context (const char *element, IString *snapshot_id, IIncremental_snapshot_context **context)=0 |
Creates a base snapshot and a context for subsequent incremental snapshots. More... |
|
virtual Size | get_updated_element_count () const =0 |
Returns the number of database elements updated by this transaction so far. More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x67fd848e, 0xce43, 0x4675, 0x8b, 0x14, 0xb2, 0x54, 0xd, 0xd2, 0x29, 0x63 > | |
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< 0x67fd848e, 0xce43, 0x4675, 0x8b, 0x14, 0xb2, 0x54, 0xd, 0xd2, 0x29, 0x63 > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
Represents the server 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.
|
pure virtual |
Adds a transaction callback.
The callback will be called when the transaction has been committed or aborted by the client, or if there is an error causing the transaction to be aborted.
callback | The callback to be added. |
callback
is NULL
).
|
pure virtual |
Creates a base snapshot and a context for subsequent incremental snapshots.
In contrast to regular snapshots, incremental snapshots contain only those elements that have been changed since the last incremental snapshot of the same context. The first incremental snapshot, also called base snapshot, of a given context contains all elements, just as the regular snapshot.
Incremental snapshots must be imported in the same order as they were created, starting with the base snapshot.
element | The top level element that incremental snapshots will be created for. | |
[out] | snapshot_id | The ID of the snapshot will be stored here if the operation is successful. |
[out] | context | The context to be used for incremental snapshots. |
element
, snapshot_id
, or context
is NULL
).
|
pure virtual |
Creates a snapshot of some database elements.
The snapshot will save the provided element and all elements it references in their current state into the disk cache. The snapshot will only reference data already in the disk cache so storage cost of snapshots is very low. Data in the disk cache is guaranteed not to be removed for as long as there exists at least one snapshot that references the data.
element | The top level element to save the snapshot for. | |
[out] | snapshot_id | The ID of the snapshot will be stored here if the operation is successful. |
element
or snapshot_id
is NULL
).
|
pure virtual |
Returns the local transaction corresponding to this Bridge transaction.
|
inline |
Returns the local transaction corresponding to this Bridge transaction.
This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid&) on the returned pointer, since the return type already is a pointer to the type T
specified as template parameter.
|
pure virtual |
Returns the session of the transaction.
|
pure virtual |
Returns the number of database elements updated by this transaction so far.
This number includes elements that have just been uploaded to the disk cache as well as elements that also have been replicated in the database.
|
pure virtual |
Removes a transaction callback.
callback | The callback to be removed. |
callback
is NULL
).