- com
- pcbsys
- nirvana
- client
- nQueueSyncTransactionReader
This reader provides a synchronous queue reader model. More...
Public Member Functions | |
void | close () |
Closing the reader releases resources held by the server for this subscription. More... | |
final void | commit () throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nIllegalStateException |
Commits all received events so far. More... | |
final void | commit (final long eventId) throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nIllegalStateException |
Committs all events up to the event id specified. More... | |
final void | commit (final long eventId, boolean ackPrevious) throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nIllegalStateException |
Committs all events up to the event id specified. More... | |
final void | rollback () throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, 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... | |
![]() | |
String | getReaderId () throws nSessionNotConnectedException |
Returns the server side unique id of the reader. More... | |
boolean | hasEventsCached () throws nIllegalStateException |
The method will return true is we have locally cached events in the reader or in the HS layer. More... | |
final nConsumeEvent | pop () throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException |
This method places thie client on the queue and will block until an event is placed onto the queue. More... | |
final nConsumeEvent | pop (final long timeout) throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException |
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... | |
final nConsumeEvent | pop (final long timeout, final String selector) throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException |
This method places thie client on the queue and will block until an event is placed onto the queue or the specified timeout expires. More... | |
int | receiveCacheReturnOutstandingRequests (List< nConsumeEvent > cacheList) throws nIllegalStateException |
This method will return the number of outstanding pop client requests, sent to the server, while also filling up the provided list with all the client-side cached events. More... | |
![]() | |
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... | |
![]() | |
void | commit (long eventId) throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nIllegalStateException |
Commits all events up to the event id specified. More... | |
void | commit (long eventId, boolean ackPrevious) throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nIllegalStateException |
Commits all events up to the event id specified. More... | |
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... | |
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 nQueuePeekContext | createContext () |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
static nQueuePeekContext | createContext (final int windowSize) |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
static nQueuePeekContext | createContext (final int windowSize, final String selector) |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
![]() | |
int | getWindowSize () |
This method stops a this object type from having transactional consuming enabled if the window is changed. More... | |
![]() | |
final int | myUniqueReaderId |
The unique id of this nQueueReader instance. 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, ie. successfully processed it or to rollback, ie unable to process this event.
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.
|
virtual |
Closing the reader releases resources held by the server for this subscription.
For a transactional reader it also rolls back any uncommitted events
Reimplemented from com.pcbsys.nirvana.client.nQueueSyncReader.
final void com.pcbsys.nirvana.client.nQueueSyncTransactionReader.commit | ( | ) | throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nIllegalStateException |
Commits all received events so far.
nSessionNotConnectedException | Client is not currently connected to the server |
nSessionPausedException | The session is currently paused |
nIllegalStateException | This exception is raised if there is any issues with any of the arguments used by this method. One condition of this is if this object has been invalidated and no longer can be utilised, this can occur if a delete request has been issued to the connected server. |
Implements com.pcbsys.nirvana.client.nQueueTransactionReader.
final void com.pcbsys.nirvana.client.nQueueSyncTransactionReader.commit | ( | final long | eventId | ) | throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nIllegalStateException |
Committs 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 | This exception is raised if there is any issues with any of the arguments used by this method. One condition of this is if this object has been invalidated and no longer can be utilised, this can occur if a delete request has been issued to the connected server. |
final void com.pcbsys.nirvana.client.nQueueSyncTransactionReader.commit | ( | final long | eventId, |
boolean | ackPrevious | ||
) | throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nIllegalStateException |
Committs all events up to the event id specified.
This means you can partially commit received events.
eventId | Event ID to commit to, inclusive |
ackPrevious | if true then all events consumed prior to this eventId will also be committed (defaults to true) |
nSessionNotConnectedException | Client is not currently connected to the server |
nSessionPausedException | The session is currently paused |
nIllegalStateException | This exception is raised if there is any issues with any of the arguments used by this method. One condition of this is if this object has been invalidated and no longer can be utilised, this can occur if a delete request has been issued to the connected server. |
final void com.pcbsys.nirvana.client.nQueueSyncTransactionReader.rollback | ( | ) | throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nIllegalStateException |
Rollbacks all received events that have not been committed or rollbacked 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 | This exception is raised if there is any issues with any of the arguments used by this method. One condition of this is if this object has been invalidated and no longer can be utilised, this can occur if a delete request has been issued to the connected server. |
Implements com.pcbsys.nirvana.client.nQueueTransactionReader.
final void com.pcbsys.nirvana.client.nQueueSyncTransactionReader.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.
eventId | Event Id to rollback to, inclusive |
nSessionNotConnectedException | Client is not currently connected to the server |
nSessionPausedException | The session is currently paused |
nIllegalStateException | This exception is raised if there is any issues with any of the arguments used by this method. One condition of this is if this object has been invalidated and no longer can be utilised, this can occur if a delete request has been issued to the connected server. |
final void com.pcbsys.nirvana.client.nQueueSyncTransactionReader.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.
eventId | Event Id to rollback to, inclusive |
individualRollback | if true, discard only this event and request redelivery. If false, keep this event but redeliver anything received after this event. |
nSessionNotConnectedException | Client is not currently connected to the server |
nSessionPausedException | The session is currently paused |
nIllegalStateException | This exception is raised if there is any issues with any of the arguments used by this method. One condition of this is if this object has been invalidated and no longer can be utilised, this can occur if a delete request has been issued to the connected server. |