com.pcbsys.nirvana.client.nIndexedDurable Class Reference

The Indexed Durable implementation. More...

Inheritance diagram for com.pcbsys.nirvana.client.nIndexedDurable:
com.pcbsys.nirvana.client.nDurable com.pcbsys.nirvana.client.nNamedObject com.pcbsys.nirvana.client.nSerialDurable com.pcbsys.nirvana.client.nSharedDurable

Public Member Functions

void acknowledge (List< nConsumeEventToken > eventTokens, bool isSynchronous)
 Acknowledges multiple events in one server call. More...
 
void acknowledge (nConsumeEventToken eventToken, bool isSynchronous, bool includePreviousEventsOutstanding)
 Acknowledges multiple events in one server call. More...
 
override void acknowledge (nConsumeEventToken eventToken, bool isSynchronous)
 Sends an acknowledge request to the server for the given event id. More...
 
override nDurableViewer createViewer ()
 Creates a nDurableViewer object for viewing the elements on a given durable object. More...
 
override void remove (long eid)
 This method will attempt to remove the event with the given event ID from the durable object. More...
 
override void remove (long start, long end)
 This method will attempt to remove the events within the specified range from the durable object. More...
 
override void remove (string filter)
 This method will attempt to remove all events from the durable object which are matching the given filter. More...
 
override void removeAll ()
 If supported, the method will attempt to remove all events from the durable object. More...
 
override void rollback (nConsumeEventToken eventToken, bool isSynchronous)
 Rollbacks the given eventToken. More...
 
void rollback (List< nConsumeEventToken > eventTokens, bool isSynchronous)
 Rollbacks multiple events in one server call. More...
 
void rollback (nConsumeEventToken eventToken, bool isSynchronous, bool includePreviousEventsOutstanding)
 Rollbacks the given eventToken. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.client.nNamedObject
long getEID ()
 Returns the current event ID that this named context is bound to More...
 
long getId ()
 Returns the unique ID of this client context. More...
 
long getLength ()
 Returns the total number of events for this particular named context. More...
 
string getName ()
 Returns the name of this client context More...
 
string getSelector ()
 Selector used for this durable object to filter events. More...
 
bool isClusterWide ()
 Does this named object exist across the cluster More...
 
bool isPersistent ()
 Will this named object be restored after the Realm Server has been restarted More...
 
virtual bool isPriorityEnabled ()
 If set the named object will queue multiple subscription such that the first subscriber will receive all events until it either disconnects or deletes the subscription, at which time, the next subscription request will start to receive events. More...
 
virtual bool isQueued ()
 Indicates whether the shared durable object is backed with a hidden queue. More...
 
virtual bool isSerial ()
 Indicates whether the durable object is shared. More...
 
virtual bool isShared ()
 Indicates whether the durable object is shared. More...
 

Detailed Description

The Indexed Durable implementation.

Multiple subscribers can hold a subscription to the same durable object. The concrete implementation of this this will determines how events are distributed among multiple subscriber.

Member Function Documentation

void com.pcbsys.nirvana.client.nIndexedDurable.acknowledge ( List< nConsumeEventToken eventTokens,
bool  isSynchronous 
)

Acknowledges multiple events in one server call.

The method is currently supported for shared durables only. An exception is thrown in case acknowledgement for event ids not consumed from this durable is requested.

Parameters
eventTokensList with identifiers of the events to be acknowledged
isSynchronousif true, the thread will be held until the server has responded to the request
Exceptions
nIllegalStateExceptionThe exception is thrown if the operation is not supported.
void com.pcbsys.nirvana.client.nIndexedDurable.acknowledge ( nConsumeEventToken  eventToken,
bool  isSynchronous,
bool  includePreviousEventsOutstanding 
)

Acknowledges multiple events in one server call.

The method is currently supported for shared durables only. An exception is thrown in case acknowledgement for event ids not consumed from this durable is requested.

Parameters
eventTokenIdentifier of the event to be acknowledged
isSynchronousif true, the thread will be held until the server has responded to the request
includePreviousEventsOutstandingif true, previous outstandig events are also acknowledged
Exceptions
nIllegalStateExceptionThe exception is thrown if the operation is not supported.
override void com.pcbsys.nirvana.client.nIndexedDurable.acknowledge ( nConsumeEventToken  eventToken,
bool  isSynchronous 
)
virtual

Sends an acknowledge request to the server for the given event id.

The method will acknowledge the current event id and all unacknowledged events with ids less than the requested.

Parameters
eventTokenIdentifier of the event to be acknowledged.
isSynchronousif true, the thread will be held until the server has responded to the request

Implements com.pcbsys.nirvana.client.nDurable.

override nDurableViewer com.pcbsys.nirvana.client.nIndexedDurable.createViewer ( )
virtual

Creates a nDurableViewer object for viewing the elements on a given durable object.

Consuming events through this object using the nDurableViewer::next() method will not consume or acknowledge the events for the given durable.

Returns
an nDurableViewer instance that can be used to view the events on a durable object in an iterative manner

Implements com.pcbsys.nirvana.client.nDurable.

override void com.pcbsys.nirvana.client.nIndexedDurable.remove ( long  eid)
virtual

This method will attempt to remove the event with the given event ID from the durable object.

Exceptions
nIllegalStateExceptionThe exception is thrown if the operation is not supported.
Parameters
eidID of the event to purge

Implements com.pcbsys.nirvana.client.nDurable.

override void com.pcbsys.nirvana.client.nIndexedDurable.remove ( long  start,
long  end 
)
virtual

This method will attempt to remove the events within the specified range from the durable object.

Exceptions
nIllegalStateExceptionThe exception is thrown if the operation is not supported.
Parameters
startID of the event to start purging from
endID of the event to perge to

Implements com.pcbsys.nirvana.client.nDurable.

override void com.pcbsys.nirvana.client.nIndexedDurable.remove ( string  filter)
virtual

This method will attempt to remove all events from the durable object which are matching the given filter.

Exceptions
nIllegalStateExceptionThe exception is thrown if the operation is not supported.
Parameters
filterThe filter to be applied during perging

Implements com.pcbsys.nirvana.client.nDurable.

override void com.pcbsys.nirvana.client.nIndexedDurable.removeAll ( )
virtual

If supported, the method will attempt to remove all events from the durable object.

Exceptions
nIllegalStateExceptionThe exception is thrown if the operation is not supported.

Implements com.pcbsys.nirvana.client.nDurable.

override void com.pcbsys.nirvana.client.nIndexedDurable.rollback ( nConsumeEventToken  eventToken,
bool  isSynchronous 
)
virtual

Rollbacks the given eventToken.

The method will rollback the current event id and all unacknowledged events with ids less than the requested.

Parameters
eventTokenIdentifier or the event to be rollbacked
isSynchronousif true, the thread will be held until the server has responded to the request
Exceptions
nIllegalStateExceptionThe exception is thrown if the operation is not supported.

Implements com.pcbsys.nirvana.client.nDurable.

void com.pcbsys.nirvana.client.nIndexedDurable.rollback ( List< nConsumeEventToken eventTokens,
bool  isSynchronous 
)

Rollbacks multiple events in one server call.

The method is currently supported for shared and serial durables only.

Parameters
eventTokensList with identifiers of the events to be rollbacked
isSynchronousif true, the thread will be held until the server has responded to the request
Exceptions
nIllegalStateExceptionThe exception is thrown if the operation is not supported.
void com.pcbsys.nirvana.client.nIndexedDurable.rollback ( nConsumeEventToken  eventToken,
bool  isSynchronous,
bool  includePreviousEventsOutstanding 
)

Rollbacks the given eventToken.

If previous outstanding are also included all unacknowledged events before the given one will also be rollbacked. The method is currently supported for shared and serial durables only.

Parameters
eventTokenIdentifier or the event to be rollbacked
isSynchronousif true, the thread will be held until the server has responded to the request
includePreviousEventsOutstandingif true, previous outstandig events are also acknowledged
Exceptions
nIllegalStateExceptionThe exception is thrown if the operation is not supported.