Packagecom.pcbsys.nirvana.client
Classpublic class nQueueAsynchronousTransactionalReader
InheritancenQueueAsynchronousTransactionalReader Inheritance com.pcbsys.nirvana.client.nQueueAsynchronousReader

This class extends the asynchronous queue model by adding the transactional ability to the reader. This enables the client to commit already received 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.



Public Methods
 MethodDefined By
  
commit(eventId:Long):void
Commits all events up to the event id specified.
nQueueAsynchronousTransactionalReader
  
rollback(eventId:Long):void
Rollbacks all events up to the specified event id that have not been committed or roll backed previously.
nQueueAsynchronousTransactionalReader
Method Detail
commit()method
public final function commit(eventId:Long):void

Commits all events up to the event id specified. This means you can partially commit received events.

Parameters
eventId:Long — a long to commit to, inclusive. If you wish to commit all events received so far do not set the value to null.


Throws
nQueueReaderClosedError — This is thrown if the queue reader is closed
 
nSessionNotConnectedError — if you have been disconnected from the server
 
nSessionNotInitialisedError — if you have not initialised the session
rollback()method 
public final function rollback(eventId:Long):void

Rollbacks all events up to the specified event id that have not been committed or roll backed previously. These events are then pushed back onto the queue for redelivery.

Parameters
eventId:Long — a long to rollback to, inclusive. If you wish to commit all events received so far do not set the value to null.


Throws
nQueueReaderClosedError — This is thrown if the queue reader is closed
 
nSessionNotConnectedError — if you have been disconnected from the server
 
nSessionNotInitialisedError — if you have not initialised the session