com.pcbsys.nirvana.client.nDurableAttributes Class Reference

This class is a container for the attributes necessary to create or locate a Durable object on a channel. More...

Inheritance diagram for com.pcbsys.nirvana.client.nDurableAttributes:
com.pcbsys.nirvana.client.nSerialDurableAttributes com.pcbsys.nirvana.client.nSharedDurableAttributes

Data Structures

enum  nDurableType
 Enumeration defining all Durable types. More...
 

Public Member Functions

String getName ()
 Returns the name of the durable store. More...
 
String getSelector ()
 Returns the current filter if supplied, used only by the Shared Durable objects. More...
 
long getStartEID ()
 Gets start eid. More...
 
nDurableType getType ()
 Returns the current type of the durable name. More...
 
boolean isClustered ()
 Indicates if the durable name is to be sent across the cluster or not. More...
 
boolean isPersistent ()
 Returns if the durable names state will be saved to disk on the server or not. More...
 
void setClustered (boolean clustered)
 If true then this durable name will be initialied and updated across all cluster nodes. More...
 
void setPersistent (boolean persistent) throws nIllegalArgumentException
 If true the server will save the state of the durable name when it changes. More...
 
void setSelector (String filter) throws nIllegalArgumentException
 If the Durable is of type Shared or SharedQueue sets the filter string for the server to use. More...
 
void setStartEID (long startEID)
 Sets the initial EID that the durable will bind to on the topic. More...
 

Static Public Member Functions

static nDurableAttributes create (nDurableType type, String name) throws nIllegalArgumentException
 A static factory method used for creating nDurableAttributes objects. More...
 

Static Public Attributes

static final long INITIAL_EID_END_OF_STORE = com.pcbsys.nirvana.base.nConstants.INITIAL_EID_END_OF_STORE
 Constant used to initialise the startEID of the durable using nDurableAttributes#setStartEID(long), so that durable is attached to end of the store and newly published events will be added to the durable.
 

Protected Member Functions

 nDurableAttributes (nDurableType type, String name) throws nIllegalArgumentException
 Instantiates durable attributes. More...
 

Protected Attributes

boolean isPersistent
 The Is persistent.
 
String mySelector
 The My selector.
 

Detailed Description

This class is a container for the attributes necessary to create or locate a Durable object on a channel.

Constructor & Destructor Documentation

com.pcbsys.nirvana.client.nDurableAttributes.nDurableAttributes ( nDurableType  type,
String  name 
) throws nIllegalArgumentException
protected

Instantiates durable attributes.

StartEID by default is set to nDurableAttributes#INITIAL_EID_END_OF_STORE, attaching the durable to the end of store so that newly published events will be added to the durable

Parameters
typenDurableType
nameName of the durable

Member Function Documentation

static nDurableAttributes com.pcbsys.nirvana.client.nDurableAttributes.create ( nDurableType  type,
String  name 
) throws nIllegalArgumentException
static

A static factory method used for creating nDurableAttributes objects.

Empty durable name or name consisting only of space characters is not allowed

Parameters
typeThe type of the durable
nameThe name of the durable
Returns
an nDurableAttributes object based on the provided parameters
Exceptions
nIllegalArgumentExceptionin case empty string or string consisting only of space characters is provided as name
String com.pcbsys.nirvana.client.nDurableAttributes.getName ( )

Returns the name of the durable store.

Returns
The name
String com.pcbsys.nirvana.client.nDurableAttributes.getSelector ( )

Returns the current filter if supplied, used only by the Shared Durable objects.

Returns
String representation of the Selector to use
long com.pcbsys.nirvana.client.nDurableAttributes.getStartEID ( )

Gets start eid.

Returns
The starting EID that this durable name will start at on the bounded topic
nDurableType com.pcbsys.nirvana.client.nDurableAttributes.getType ( )

Returns the current type of the durable name.

Returns
the type
boolean com.pcbsys.nirvana.client.nDurableAttributes.isClustered ( )

Indicates if the durable name is to be sent across the cluster or not.

Returns
The current cluster flag
Deprecated:
The cluster-wide flag is deprecated since 10.5. The method will be removed. When removed the durable will be treated as cluster-wide if its parent channel is a cluster-wide one.
boolean com.pcbsys.nirvana.client.nDurableAttributes.isPersistent ( )

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

Returns
the current state
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.
void com.pcbsys.nirvana.client.nDurableAttributes.setClustered ( boolean  clustered)

If true then this durable name will be initialied and updated across all cluster nodes.

Parameters
clusteredthe clustered
Deprecated:
The cluster-wide flag is deprecated since 10.5. The method will be removed. When removed the durable will be treated as cluster-wide if its parent channel is a cluster-wide one.
void com.pcbsys.nirvana.client.nDurableAttributes.setPersistent ( boolean  persistent) throws nIllegalArgumentException

If true the server will save the state of the durable name when it changes.

Parameters
persistentthe persistent
Exceptions
nIllegalArgumentExceptionthe n illegal argument exception
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.
void com.pcbsys.nirvana.client.nDurableAttributes.setSelector ( String  filter) throws nIllegalArgumentException

If the Durable is of type Shared or SharedQueue sets the filter string for the server to use.

Parameters
filterString for the server to use
Exceptions
nIllegalArgumentExceptionthe n illegal argument exception
void com.pcbsys.nirvana.client.nDurableAttributes.setStartEID ( long  startEID)

Sets the initial EID that the durable will bind to on the topic.


Setting the startEID to
   nDurableAttributes#INITIAL_EID_END_OF_STORE, attaches the durable to end of topic allowing newly published events to be added to the durable
   any value greater than nDurableAttributes#INITIAL_EID_END_OF_STORE, binds the durable on the topic

Parameters
startEIDthe start eid