com.pcbsys.nirvana.client.nQueueTransactionReader Interface Referenceabstract

Provides the basic interface for transactional queue operations, used by the synchronous and asynchronous transactional queue readers. More...

Inheritance diagram for com.pcbsys.nirvana.client.nQueueTransactionReader:
com.pcbsys.nirvana.client.nQueueAsyncTransactionReader com.pcbsys.nirvana.client.nQueueSyncTransactionFragmentReader com.pcbsys.nirvana.client.nQueueSyncTransactionReader

Public Member Functions

abstract void commit () throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
 Commits all received events so far. More...
 
abstract void commit (long eventId) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
 Commits all events up to the event id specified. More...
 
abstract void commit (long eventId, boolean ackPrevious) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
 Commits all events up to the event id specified. More...
 
abstract void rollback (long eventId) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
 Rollbacks all events up to the specified event id that have not been committed or rollbacked previously. More...
 
abstract void rollback (long eventId, boolean isIndividual) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
 If isIndividual then this rolls back just the event with the specified event ID. More...
 
abstract void rollback () throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
 Rollbacks all received events that have not been committed or rollbacked previously. More...
 

Detailed Description

Provides the basic interface for transactional queue operations, used by the synchronous and asynchronous transactional queue readers.

Member Function Documentation

abstract void com.pcbsys.nirvana.client.nQueueTransactionReader.commit ( ) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
pure virtual

Commits all received events so far.

Exceptions
nSessionNotConnectedExceptionClient is not currently connected to the server
nSessionPausedExceptionThe session is currently paused
nIllegalStateExceptionThe operation could not complete because of a session/connection error
nRequestTimedOutExceptionThe server failed to respond with the specified timeout

Implemented in com.pcbsys.nirvana.client.nQueueAsyncTransactionReader, com.pcbsys.nirvana.client.nQueueSyncTransactionReader, and com.pcbsys.nirvana.client.nQueueSyncTransactionFragmentReader.

abstract void com.pcbsys.nirvana.client.nQueueTransactionReader.commit ( long  eventId) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
pure virtual

Commits all events up to the event id specified.

This means you can partially commit received events.

Parameters
eventIdEvent ID to commit to, inclusive
Exceptions
nSessionNotConnectedExceptionClient is not currently connected to the server
nSessionPausedExceptionThe session is currently paused
nIllegalStateExceptionThe operation could not complete because of a session/connection error
nRequestTimedOutExceptionThe server failed to respond with the specified timeout
abstract void com.pcbsys.nirvana.client.nQueueTransactionReader.commit ( long  eventId,
boolean  ackPrevious 
) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
pure virtual

Commits all events up to the event id specified.

This means you can partially commit received events.

Parameters
eventIdEvent ID to commit to, inclusive
ackPreviousif true then all events consumed prior to this eventId will also be committed (defaults to true)
Exceptions
nSessionNotConnectedExceptionClient is not currently connected to the server
nSessionPausedExceptionThe session is currently paused
nIllegalStateExceptionThe operation could not complete because of a session/connection error
nRequestTimedOutExceptionThe server failed to respond with the specified timeout
abstract void com.pcbsys.nirvana.client.nQueueTransactionReader.rollback ( long  eventId) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
pure virtual

Rollbacks all events up to the specified event id that have not been committed or rollbacked previously.

These events are then pushed back onto the queue for redelivery.

Parameters
eventIdEvent Id to rollback to, inclusive
Exceptions
nSessionNotConnectedExceptionClient is not currently connected to the server
nSessionPausedExceptionThe session is currently paused
nIllegalStateExceptionThe operation could not complete because of a session/connection error
nRequestTimedOutExceptionThe server failed to respond with the specified timeout
abstract void com.pcbsys.nirvana.client.nQueueTransactionReader.rollback ( long  eventId,
boolean  isIndividual 
) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
pure virtual

If isIndividual then this rolls back just the event with the specified event ID.

This event is then pushed back onto the queue for redelivery. If !isIndividual then all events consumed after the specified event ID are rolled back.

Parameters
eventIdEvent Id to rollback
isIndividualIf true then roll back just this event ID. Otherwise roll back all events with ID greater than or equal to this
Exceptions
nSessionNotConnectedExceptionClient is not currently connected to the server
nSessionPausedExceptionThe session is currently paused
nIllegalStateExceptionThe operation could not complete because of a session/connection error
nRequestTimedOutExceptionThe server failed to respond with the specified timeout
abstract void com.pcbsys.nirvana.client.nQueueTransactionReader.rollback ( ) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
pure virtual

Rollbacks all received events that have not been committed or rollbacked previously.

These events are then pushed back onto the queue for redelivery.

Exceptions
nSessionNotConnectedExceptionClient is not currently connected to the server
nSessionPausedExceptionThe session is currently paused
nIllegalStateExceptionThe operation could not complete because of a session/connection error
nRequestTimedOutExceptionThe server failed to respond with the specified timeout

Implemented in com.pcbsys.nirvana.client.nQueueSyncTransactionReader, com.pcbsys.nirvana.client.nQueueAsyncTransactionReader, and com.pcbsys.nirvana.client.nQueueSyncTransactionFragmentReader.