VASResult shore_vas::trans(tid_t *tid=0); VASResult shore_vas::beginTrans( int degree, tid_t *tid = 0); VASResult shore_vas::abortTrans(int reason = ST_UserAbort); VASResult shore_vas::abortTrans(const tid_t &tid, int reason = ST_UserAbort); VASResult shore_vas::commitTrans(); VASResult shore_vas::commitTrans(const tid_t &tid);
BeginTrans, abortTrans, and commitTrans start, roll back, and commit transactions, respectively.
For commitTrans and abortTrans, the argument tid identifies the transaction to be committed or aborted, respectively. If no such argument is given, the current transaction is committed or aborted.
BeginTrans takes an argument, degree, which takes a value between 0 and 3, respectively.
In general, user errors in SVAS methods cause the transaction to be rolled back to its state when the SVAS method was called. Some errors are serious enough to cause the entire transaction to be aborted.
After a method returns in error (it returns SVAS_FAILURE), the shore_vasobject'sstatusindicatesthatthe reason for the failure is ST_SmFailure. (the Storage Manager detected a problem; the Storage Manager's reason indicates that a deadlock occurred). The status also indicates whether the transaction was aborted or is still active. If the transaction was aborted, The caller must recognize the condition and start a new transaction in order to proceed. to be aborted.