com.pcbsys.nirvana.client.nNamedObject Class Referenceabstract

This class represents a client context on a RealmServer. More...

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

Public Member Functions

void ack (long[] eids) throws nIllegalArgumentException, nSessionPausedException, nSessionNotConnectedException, nRequestTimedOutException
 Acknowledge multiple events in one server call. More...
 
void ack (long[] eids, boolean isSynchronous) throws nIllegalArgumentException, nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException
 Acknowledge multiple events in one server call. More...
 
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...
 
String getName ()
 Returns the name of this client context. More...
 
long getOutstandingEvents ()
 Returns the number of outstanding events to be consumed for this durable object. More...
 
boolean isDurableObjectInvalid ()
 When a store is removed (or modified which entails a remove and create) then these logical representations can become invalid Once they are invalid you must perform a findChannel again on the nSession to acquire the latest object. More...
 
boolean isPersistent ()
 Returns if the durable names state is saved to disk on the server or not. More...
 
boolean isSerial ()
 If set the named object will queue multiple subscribers and send events to them in a serial fashion (events are processed in the order that they are published across all consumers). More...
 
boolean isShared ()
 If set the named object will queue multiple subscribers and send events to them in a round-robin fashion. More...
 

Detailed Description

This class represents a client context on a RealmServer.

In as much as that if a client session is closed and sometime later a new client session is created by referencing this named object the client can resume where they were

Member Function Documentation

void com.pcbsys.nirvana.client.nNamedObject.ack ( long[]  eids) throws nIllegalArgumentException, nSessionPausedException, nSessionNotConnectedException, nRequestTimedOutException

Acknowledge multiple events in one server call.

The first argument contains all of the event IDs that you want to commit. This is functionally equivalent to calling nConsumeEvent.ack() for each event.

Parameters
eidsan array of the event IDs to be acknowledged.
Exceptions
nIllegalArgumentExceptionthrown if the event IDs were not consumed by this connection or if the named object is not shared. Also 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. Some other conditions are if the event IDs were not consumed by this connection or if the named object is not shared.
nSessionNotConnectedExceptionwe cannot write to the server if the session is not open
nSessionPausedExceptionwe cannot write to the server if the session is not open
nRequestTimedOutExceptionthe server did not respond within the time allocated
Deprecated:
since 9.12 replaced with specific implementation in nSharedDurable
void com.pcbsys.nirvana.client.nNamedObject.ack ( long[]  eids,
boolean  isSynchronous 
) throws nIllegalArgumentException, nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException

Acknowledge multiple events in one server call.

The first argument contains all of the event IDs that you want to commit. This is functionally equivalent to calling nConsumeEvent.ack() for each event.

Parameters
eidsan array of the event IDs to be acknowledged.
isSynchronousif true, the thread will be held until the server has responded to the request
Exceptions
nIllegalArgumentExceptionthrown if the event IDs were not consumed by this connection or if the named object is not shared. Also 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. Some other conditions are if the event IDs were not consumed by this connection or if the named object is not shared.
nSessionNotConnectedExceptionwe cannot write to the server if the session is not open
nSessionPausedExceptionwe cannot write to the server if the session is not open
nRequestTimedOutExceptionthe server did not respond within the time allocated
Deprecated:
since 9.12 replaced with specific implementation in nSharedDurable
long com.pcbsys.nirvana.client.nNamedObject.getEID ( )

Returns the current event ID that this named context is bound to.

Returns
long event ID
long com.pcbsys.nirvana.client.nNamedObject.getID ( )

Returns the unique ID of this client context.

Returns
long
String com.pcbsys.nirvana.client.nNamedObject.getName ( )

Returns the name of this client context.

Returns
String
long com.pcbsys.nirvana.client.nNamedObject.getOutstandingEvents ( )

Returns the number of outstanding events to be consumed for this durable object.

Returns
number of outstanding events
Since
9.12
boolean com.pcbsys.nirvana.client.nNamedObject.isDurableObjectInvalid ( )

When a store is removed (or modified which entails a remove and create) then these logical representations can become invalid Once they are invalid you must perform a findChannel again on the nSession to acquire the latest object.

Returns
true if this store is no longer valid
boolean com.pcbsys.nirvana.client.nNamedObject.isPersistent ( )

Returns if the durable names state is saved to disk on the server or not.

Returns
boolean flag
Deprecated:
This persistent flag is deprecated since 10.5. The method will be removed. Persistence of the durable will be defined by the persistence support of the parent channel. If the parent channel supports persistent events, its durables will always be created as persistent.
boolean com.pcbsys.nirvana.client.nNamedObject.isSerial ( )

If set the named object will queue multiple subscribers and send events to them in a serial fashion (events are processed in the order that they are published across all consumers).

Returns
true if the named object is of serial durable type.
Since
10.1
boolean com.pcbsys.nirvana.client.nNamedObject.isShared ( )

If set the named object will queue multiple subscribers and send events to them in a round-robin fashion.

Returns
true if the named object is of shared durable type.