com.pcbsys.nirvana.client.nQueueAsyncTransactionReader Class Reference

This class extends the asynchronous queue model by adding the transactional ability to the reader. More...

Inheritance diagram for com.pcbsys.nirvana.client.nQueueAsyncTransactionReader:
com.pcbsys.nirvana.client.nQueueAsyncReader com.pcbsys.nirvana.client.nQueueTransactionReader com.pcbsys.nirvana.client.nQueueReader

Public Member Functions

final void commit () throws nSessionNotConnectedException, nRequestTimedOutException, nSessionPausedException,nIllegalStateException
 Commits all received events so far. More...
 
final void commit (final long eventId) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
 Commits all events up to the event id specified. More...
 
final void commit (final long eventId, boolean ackPrevious) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
 Commits all events up to the event id specified. More...
 
final void rollback () throws nSessionNotConnectedException, nRequestTimedOutException, nSessionPausedException,nIllegalStateException
 Rollbacks all received events that have not been committed or rollbacked previously. More...
 
final void rollback (final 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...
 
final void rollback (final long eventId, boolean individualRollback) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException
 Rollbacks all events up to the specified event id that have not been committed or rollbacked previously. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.client.nQueueReader
boolean hasConsumedEvents ()
 Method to see whether the reader has consumed any events. More...
 
boolean isClosed ()
 When a reader is closed, the physical subscription is closed at the server. More...
 
boolean isClosedLocally ()
 A reader can be closed, but the physical subscription queue is not closed at the server. More...
 
final nConsumeEvent[] peek (final nQueuePeekContext context) throws nSecurityException, nChannelNotFoundException, nSessionNotConnectedException, nRequestTimedOutException, nUnexpectedResponseException,nSessionPausedException, nIllegalArgumentException, nIllegalStateException
 Performs a non destructive read. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.client.nQueueTransactionReader
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from com.pcbsys.nirvana.client.nQueueReader
static final nQueuePeekContext createContext ()
 Creates a Queue Peek Context, which is used to traverse the queue. More...
 
static final nQueuePeekContext createContext (final int windowSize)
 Creates a Queue Peek Context, which is used to traverse the queue. More...
 
static final nQueuePeekContext createContext (final int windowSize, final String selector)
 Creates a Queue Peek Context, which is used to traverse the queue. More...
 

Detailed Description

This class extends the asynchronous queue model by adding the transactional ability to the reader.

This enables the client to commit already recieved events or roll them back. When a rollback occurs the events that have not been committed by this client are then pushed back onto the queue for redelivery to other clients.

Member Function Documentation

final void com.pcbsys.nirvana.client.nQueueAsyncTransactionReader.commit ( ) throws nSessionNotConnectedException, nRequestTimedOutException, nSessionPausedException,nIllegalStateException
virtual
final void com.pcbsys.nirvana.client.nQueueAsyncTransactionReader.commit ( final long  eventId) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException

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
nSessionNotConnectedException
nRequestTimedOutException
nIllegalStateException
final void com.pcbsys.nirvana.client.nQueueAsyncTransactionReader.commit ( final long  eventId,
boolean  ackPrevious 
) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException

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
nSessionNotConnectedException
nRequestTimedOutException
nIllegalStateException
final void com.pcbsys.nirvana.client.nQueueAsyncTransactionReader.rollback ( ) throws nSessionNotConnectedException, nRequestTimedOutException, nSessionPausedException,nIllegalStateException
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
nSessionNotConnectedException
nRequestTimedOutException
nIllegalStateException

Implements com.pcbsys.nirvana.client.nQueueTransactionReader.

final void com.pcbsys.nirvana.client.nQueueAsyncTransactionReader.rollback ( final long  eventId) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException

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
nSessionNotConnectedException
nRequestTimedOutException
nIllegalStateException
final void com.pcbsys.nirvana.client.nQueueAsyncTransactionReader.rollback ( final long  eventId,
boolean  individualRollback 
) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nIllegalStateException

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
individualRollbackif true, discard only this event and request redelivery. If false, keep this event but redeliver anything received after this event.
Exceptions
nSessionNotConnectedException
nRequestTimedOutException
nIllegalStateException