yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches
Commit Complete Callback

Commit Complete Callbacks allow SIL or SIL-SA code to be invoked when an edit transaction is completed. More...

Collaboration diagram for Commit Complete Callback:

Typedefs

typedef status_t(* agt_commit_complete_cb_t) (agt_commit_type_t commit_type)
 Typedef of the commit_complete callback. More...
 

Functions

void agt_commit_complete_init (void)
 Initialise the callback commit module. More...
 
void agt_commit_complete_cleanup (void)
 Cleanup the callback commit module. More...
 
status_t agt_commit_complete_register (const xmlChar *modname, agt_commit_complete_cb_t cb)
 Register a Commit Complete callback. More...
 
void agt_commit_complete_unregister (const xmlChar *modname)
 Unregister a Commit Complete callback. More...
 
status_t agt_commit_complete (ses_cb_t *scb, rpc_msg_t *msg, agt_commit_type_t commit_type, val_value_t *source, val_value_t *target, boolean epc_only)
 Complete a commit operation. More...
 
const xmlChar * agt_commit_complete_get_type (agt_commit_type_t commit_type)
 Get the keyword for the specified agt_commit_type_t enumeration. More...
 

Detailed Description

Commit Complete Callbacks allow SIL or SIL-SA code to be invoked when an edit transaction is completed.

It is often used to cleanup or commit a set of edits at once to remove order dependencies in the edited objects.

Typedef Documentation

◆ agt_commit_complete_cb_t

typedef status_t(* agt_commit_complete_cb_t) (agt_commit_type_t commit_type)

Typedef of the commit_complete callback.

  • Specific to the "<commit>" operation
  • Invoked if the validate, apply, and commit all return NO_ERR
  • This is a legacy API from yuma
Parameters
commit_type
  • AGT_COMMIT_TYPE_NORMAL is a "<commit>" operation
  • AGT_COMMIT_TYPE_REPLAY is a replay-commit procedure
Returns
status
  • Need to return NO_ERR or else end of transaction can be incompleted

Function Documentation

◆ agt_commit_complete()

status_t agt_commit_complete ( ses_cb_t scb,
rpc_msg_t msg,
agt_commit_type_t  commit_type,
val_value_t source,
val_value_t target,
boolean  epc_only 
)

Complete a commit operation.

This function simply calls each registered commit complete callback. If a commit complete operation fails the status of the failing operation is returned immediately and no further commit complete callbacks are made.

Parameters
scbsession control block making the request
msgRPC msg message in progress containing transaction CB
commit_typecommit type (normal or replay)
sourcesource datastore root to use for the callback
targettarget datastore root to use for the callback
epc_onlyEPC callback mode
  • TRUE if Edit Phase Complete callback only
  • FALSE if all callback types (legacy and EPC)
Returns
NO_ERR or the status of the first failing callback.
Here is the call graph for this function:

◆ agt_commit_complete_cleanup()

void agt_commit_complete_cleanup ( void  )

Cleanup the callback commit module.

Called by the server during shutdown.

Here is the call graph for this function:

◆ agt_commit_complete_get_type()

const xmlChar * agt_commit_complete_get_type ( agt_commit_type_t  commit_type)

Get the keyword for the specified agt_commit_type_t enumeration.

Parameters
commit_typetype to use
Returns
string for the hook type, or "none" or "illegal"

◆ agt_commit_complete_init()

void agt_commit_complete_init ( void  )

Initialise the callback commit module.

Must be called before module is used for registration.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_commit_complete_register()

status_t agt_commit_complete_register ( const xmlChar *  modname,
agt_commit_complete_cb_t  cb 
)

Register a Commit Complete callback.

This function registers a Commit Complete callback that will be called right after Commit Phase has been processed during the "<commit>". If a commit complete operation is already registered for the module it will be replaced.

Parameters
modnamename of the module registering the callback
cbthe commit complete function.
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_commit_complete_unregister()

void agt_commit_complete_unregister ( const xmlChar *  modname)

Unregister a Commit Complete callback.

This function unregisters a Commit Complete callback.

Parameters
modnamename of the module unregistering the callback
Here is the call graph for this function: