This reader provides a synchronous queue reader model. More...
Public Member Functions | |
void | commit () |
Commits all received events so far. More... | |
void | commit (long eventId) |
Commits all events up to the event id specified. More... | |
void | rollback () |
Rolls back all received events that have not been committed or rolled back previously. More... | |
void | rollback (long eventId) |
Rolls back all events up to the specified event id that have not been committed or rolled back previously. More... | |
Public Member Functions inherited from com.pcbsys.nirvana.client.nQueueSyncFragmentReader | |
override void | close () |
Close the reader and the server subscription More... | |
override void | closeLocally () |
Close the reader locally which will n ot result in any rollback of transactional readers More... | |
nConsumeEvent | pop () |
This method places the client on the queue and will block until an event is placed onto the queue. More... | |
nConsumeEvent | pop (long timeout) |
This method places the client on the queue and will block until an event is placed onto the queue or the specified timeout expires. More... | |
nConsumeEvent | pop (long timeout, string selector) |
This method places the client on the queue and will block until an event is placed onto the queue or the specified timeout expires. More... | |
Public Member Functions inherited from com.pcbsys.nirvana.client.nQueueReader | |
bool | hasConsumedEvents () |
Method to see whether the reader has consumed any events. More... | |
bool | isClosed () |
When a reader is closed, the physical subscription is closed at the server. More... | |
bool | isClosedLocally () |
A reader can be closed, but the physical subscription queue is not closed at the server. More... | |
nConsumeEvent[] | peek (nQueuePeekContext context) |
Performs a non destructive read More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from com.pcbsys.nirvana.client.nQueueReader | |
static nQueuePeekContext | createContext () |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
static nQueuePeekContext | createContext (int windowSize) |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
static nQueuePeekContext | createContext (int windowSize, string selector) |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
This reader provides a synchronous queue reader model.
Where the client can pop()
events from the queue and then decide either to commit the event, i.e. successfully processed it or to rollback, i.e. unable to process this event. The only difference with nQueueSyncTransactionReader is that pop()
calls will only return events once all fragments have been received.
When the window size is reached and the client has yet to call commit or rollback the server will raise an exception on the pop()
command until the client has called either method.
void com.pcbsys.nirvana.client.nQueueSyncTransactionFragmentReader.commit | ( | ) |
Commits all received events so far.
nSessionNotConnectedException | Client is not currently connected to the server |
nSessionPausedException | The session is currently paused |
nIllegalStateException | The operation could not complete because of a session/connection error |
Implements com.pcbsys.nirvana.client.nQueueTransactionReader.
void com.pcbsys.nirvana.client.nQueueSyncTransactionFragmentReader.commit | ( | long | eventId | ) |
Commits all events up to the event id specified.
This means you can partially commit received events.
eventId | Event ID to commit to, inclusive |
nSessionNotConnectedException | Client is not currently connected to the server |
nSessionPausedException | The session is currently paused |
nIllegalStateException | The operation could not complete because of a session/connection error |
Implements com.pcbsys.nirvana.client.nQueueTransactionReader.
void com.pcbsys.nirvana.client.nQueueSyncTransactionFragmentReader.rollback | ( | ) |
Rolls back all received events that have not been committed or rolled back previously.
These events are then pushed back onto the queue for redelivery.
nSessionNotConnectedException | Client is not currently connected to the server |
nSessionPausedException | The session is currently paused |
nIllegalStateException | The operation could not complete because of a session/connection error |
Implements com.pcbsys.nirvana.client.nQueueTransactionReader.
void com.pcbsys.nirvana.client.nQueueSyncTransactionFragmentReader.rollback | ( | long | eventId | ) |
Rolls back all events up to the specified event id that have not been committed or rolled back previously.
These events are then pushed back onto the queue for redelivery.
eventId | Event Id to rollback to, inclusive |
nSessionNotConnectedException | Client is not currently connected to the server |
nSessionPausedException | The session is currently paused |
nIllegalStateException | The operation could not complete because of a session/connection error |
Implements com.pcbsys.nirvana.client.nQueueTransactionReader.