- com
- pcbsys
- nirvana
- client
- nTransaction
This class enables the client to perform transactional publishing, representing a nirvana transaction. More...
#include <nTransaction.h>
Public Member Functions | |
void | abort () |
Aborts the transaction associated with the txid provided and this channel. More... | |
void | commit () |
Commits the transaction id associated to this channel on the server. More... | |
void | commit (longlong delay) |
Commits the transaction id associated to this channel on the server. More... | |
void | commit (time_t timeToPublish, int millisecsToPublish) |
Commits the transaction id associated to this channel on the server. More... | |
nTransactionAttributes * | getAttributes () |
Gets the transaction attributes object associated with this transaction. More... | |
longlong | getEndEID () |
Gets the end event id of the range to be published by this transaction. More... | |
longlong | getStartEID () |
Gets the start event id of the range to be published by this transaction. More... | |
longlong | getTXID () |
Gets the end transaction id associated with this transaction. More... | |
bool | isAborted () |
Checks if this transaction is aborted. More... | |
bool | isAborted (bool forceRemoteCheck) |
Method that checks if this transaction is aborted. More... | |
bool | isCommitted () |
Checks if this transaction is committed. More... | |
bool | isCommitted (bool forceRemoteCheck) |
Method that checks if this transaction is committed. More... | |
void | publish (std::list< nConsumeEvent * > &events) |
Adds the specified collection of nConsumeEvent objects to this transaction. More... | |
void | publish (nConsumeEvent *pEvt) |
Adds the specified nConsumeEvent to this transaction. More... | |
void | push (nConsumeEvent *pEvt) |
Pushes the specified nConsumeEvent to this transaction. More... | |
Static Public Member Functions | |
static bool | getCacheLocalBeforeCommit () |
Gets the cacheLocalBeforeCommit value- if true then events will be cached before commit. More... | |
static void | setCacheLocalBeforeCommit (bool bCacheLocal) |
Sets cacheLocalBeforeCommit value- if true then events will be cached before commit. More... | |
This class enables the client to perform transactional publishing, representing a nirvana transaction.
void com::pcbsys::nirvana::client::nTransaction::abort | ( | ) |
Aborts the transaction associated with the txid provided and this channel.
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nRequestTimedOutException | The server did not respond within the timeout period |
nChannelNotFoundException | The channel, typically, has been deleted |
nSecurityException | The client does not have permissions to perform this operation |
nUnexpectedResponseException | The server responded with with an unknown response, see the message for more information |
nTransactionNotStartedException | The transaction has not been started |
nTransactionNoSuchTXIDException | There is no known TXID, typically the transaction has timed out |
nTransactionAlreadyCommittedException | The transaction has already been committed |
nTransactionAlreadyAbortedException | The transaction has already been aborted |
nSessionPausedException | The session is currently paused |
void com::pcbsys::nirvana::client::nTransaction::commit | ( | ) |
Commits the transaction id associated to this channel on the server.
We then wait for the server to respond. The server responds with the EIDs of the events that have been put on to this channel for the supplied transaction id. Once this process is complete we remove the supplied transaction id from the list of transactions found within the controlling nSession.
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nRequestTimedOutException | The server did not respond within the timeout period |
nChannelNotFoundException | The channel, typically, has been deleted |
nSecurityException | The client does not have permissions to perform this operation |
nUnexpectedResponseException | The server responded with with an unknown response, see the message for more information |
nTransactionNotStartedException | The transaction has not been started |
nTransactionNoSuchTXIDException | There is no known TXID, typically the transaction has timed out |
nTransactionAlreadyCommittedException | The transaction has already been committed |
nTransactionAlreadyAbortedException | The transaction has already been aborted |
nSessionPausedException | The session is currently paused |
nPublishPausedException | when publishing is paused server side |
void com::pcbsys::nirvana::client::nTransaction::commit | ( | longlong | delay | ) |
Commits the transaction id associated to this channel on the server.
This method allows the transaction to be delayed until t+delay before it is committed
We then wait for the server to respond. The server responds with the EIDs of the events that have been put on to this channel for the supplied transaction id. Once this process is complete we remove the supplied transaction id from the list of transactions found within the controlling nSession.
delay | - the number of milliseconds to delay the commit for at the server |
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nRequestTimedOutException | The server did not respond within the timeout period |
nChannelNotFoundException | The channel, typically, has been deleted |
nSecurityException | The client does not have permissions to perform this operation |
nUnexpectedResponseException | The server responded with with an unknown response, see the message for more information |
nTransactionNotStartedException | The transaction has not been started |
nTransactionNoSuchTXIDException | There is no known TXID, typically the transaction has timed out |
nTransactionAlreadyCommittedException | The transaction has already been committed |
nTransactionAlreadyAbortedException | The transaction has already been aborted |
nSessionPausedException | The session is currently paused |
nPublishPausedException | when publishing is paused server side |
void com::pcbsys::nirvana::client::nTransaction::commit | ( | time_t | timeToPublish, |
int | millisecsToPublish | ||
) |
Commits the transaction id associated to this channel on the server.
This method allows the transaction to be committed at a future date, rather than immediately.
We then wait for the server to respond. The server responds with the EIDs of the events that have been put on to this channel for the supplied transaction id. Once this process is complete we remove the supplied transaction id from the list of transactions found within the controlling nSession.
timeToPublish | date at which the transaction will be committed |
millisecsToPublish | the number of milliseconds after timeToPublish to publish |
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nRequestTimedOutException | The server did not respond within the timeout period |
nChannelNotFoundException | The channel, typically, has been deleted |
nSecurityException | The client does not have permissions to perform this operation |
nUnexpectedResponseException | The server responded with with an unknown response, see the message for more information |
nTransactionNotStartedException | The transaction has not been started |
nTransactionNoSuchTXIDException | There is no known TXID, typically the transaction has timed out |
nTransactionAlreadyCommittedException | The transaction has already been committed |
nTransactionAlreadyAbortedException | The transaction has already been aborted |
nSessionPausedException | The session is currently paused |
nPublishPausedException | when publishing is paused server side |
nTransactionAttributes* com::pcbsys::nirvana::client::nTransaction::getAttributes | ( | ) |
Gets the transaction attributes object associated with this transaction.
|
static |
Gets the cacheLocalBeforeCommit value- if true then events will be cached before commit.
longlong com::pcbsys::nirvana::client::nTransaction::getEndEID | ( | ) |
Gets the end event id of the range to be published by this transaction.
nTransactionNotCommittedException | is thrown if the transaction is not yet committed |
longlong com::pcbsys::nirvana::client::nTransaction::getStartEID | ( | ) |
Gets the start event id of the range to be published by this transaction.
nTransactionNotCommittedException | is thrown if the transaction is not yet committed |
longlong com::pcbsys::nirvana::client::nTransaction::getTXID | ( | ) |
Gets the end transaction id associated with this transaction.
bool com::pcbsys::nirvana::client::nTransaction::isAborted | ( | ) |
Checks if this transaction is aborted.
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nRequestTimedOutException | The server did not respond within the timeout period |
nSessionPausedException | The session is currently paused |
nTransactionIncompleteException | the transaction is invalid or incomplete |
bool com::pcbsys::nirvana::client::nTransaction::isAborted | ( | bool | forceRemoteCheck | ) |
Method that checks if this transaction is aborted.
forceRemoteCheck | if false, the transaction will check its local state first before checking with the realm server, if true, it will check with the realm server only |
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nRequestTimedOutException | The server did not respond within the timeout period |
nSessionPausedException | The session is currently paused |
nTransactionIncompleteException | the transaction is invalid or incomplete |
bool com::pcbsys::nirvana::client::nTransaction::isCommitted | ( | ) |
Checks if this transaction is committed.
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nRequestTimedOutException | The server did not respond within the timeout period |
nSessionPausedException | The session is currently paused |
nTransactionIncompleteException | the transaction is invalid or incomplete |
nUnknownTransactionIdException | the transaction id is not known on this server |
bool com::pcbsys::nirvana::client::nTransaction::isCommitted | ( | bool | forceRemoteCheck | ) |
Method that checks if this transaction is committed.
forceRemoteCheck | if false, the transaction will check its local state first before checking with the realms server, if true, it will check with the realm server only |
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nRequestTimedOutException | The server did not respond within the timeout period |
nSessionPausedException | The session is currently paused |
nTransactionIncompleteException | the transaction is invalid or incomplete |
nUnknownTransactionIdException | the transaction id is not known on this server |
void com::pcbsys::nirvana::client::nTransaction::publish | ( | std::list< nConsumeEvent * > & | events | ) |
Adds the specified collection of nConsumeEvent objects to this transaction.
No events will be published until this transaction is committed.
events | the List collection of nConsumeEvent objects to be added to this transaction |
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nSecurityException | The client does not have permissions to perform this operation |
nTransactionAlreadyCommittedException | The transaction has already been committed |
nTransactionAlreadyAbortedException | The transaction has already been aborted |
nTransactionNoEventsException | There are no nConsumeEvents in the list |
nSessionPausedException | The session is currently paused |
nPublishPausedException | when publishing is paused server side |
void com::pcbsys::nirvana::client::nTransaction::publish | ( | nConsumeEvent * | pEvt | ) |
Adds the specified nConsumeEvent to this transaction.
No events will be published until this transaction is committed
*pEvt | the nConsumeEvent object to be added to this transaction |
nSessionNotConnectedException | The session is not currently connected to the server when this call was made |
nSecurityException | The client does not have permissions to perform this operation |
nTransactionAlreadyCommittedException | The transaction has already been committed |
nTransactionAlreadyAbortedException | The transaction has already been aborted |
nSessionPausedException | The session is currently paused |
nPublishPausedException | when publishing is paused server side |
void com::pcbsys::nirvana::client::nTransaction::push | ( | nConsumeEvent * | pEvt | ) |
Pushes the specified nConsumeEvent to this transaction.
No events will be published until this transaction is committed
*pEvt | the nConsumeEvent object to be added to this transaction |
nSessionNotConnectedException | is thrown if the session is not connected |
nTransactionAlreadyCommittedException | is thrown if the transaction is already committed |
nTransactionNoEventsException | is thrown if the transaction has no events pushed |
nSecurityException | is thrown if the user has insufficient privileges |
nTransactionAlreadyAbortedException | is thrown if the transaction has been aborted. |
nSessionPausedException | The session is currently paused |
nPublishPausedException | when publishing is paused server side |
|
static |
Sets cacheLocalBeforeCommit value- if true then events will be cached before commit.
Default value is "false". Can be set in anytime in runtime
bCacheLocal- | the new value of cacheLocalBeforeCommit |