com.pcbsys.nirvana.client.nStoreProperties Class Reference

Class that contains additional properties that can be set on the channel or queue. More...

Public Member Functions

boolean canSyncOnEachWrite ()
 Whether each write to the store will also call sync on the file system to ensure all data is written to the Disk. More...
 
void copy (nStoreProperties property)
 Copies the settings from the parameter to the local isntance. More...
 
boolean enableMulticast ()
 Returns the status of multicast support for this channel. More...
 
void enableMulticast (boolean flag)
 Turns on/off multicast support for this channel. More...
 
boolean equals (Object obj)
 Returns true if the store properties of the two channels are the same. More...
 
boolean getCacheOnReload ()
 When a server restarts it will scan all file based stores and check for corruption. More...
 
String getClientMergeEngineClassname ()
 Returns the currently configured merge class name, if supplied else null. More...
 
boolean getEnableCaching ()
 Returns true if the server will cache events in memory or will always refer back to the file backed store. More...
 
boolean getEnableReadBuffering ()
 Returns the current state of read buffering for the store, if true, then reads will be buffered to optimize the I/O access to the file based store. More...
 
boolean getHonorCapacityWhenFull ()
 Whether the channel / queue capacity setting will prevent publishing of any more data once full. More...
 
int getMultiFileEventsPerSpindle ()
 Returns the number of events that are stored per individual files for a single store. More...
 
boolean getPerformAutomaticMaintenance ()
 Whether the store will be have automatic maintenance as events are being removed. More...
 
int getPriority ()
 Returns the priority of this channel. More...
 
long getReadBufferSize ()
 If ReadBuffering is enabled then this function returns the size in bytes of the buffer to use. More...
 
int getStampDictionary ()
 Get the StampDictionary setting value of this store. More...
 
int getSyncBatchTime ()
 Returns the maximum time (in milliseconds) to store events before calling sync on the file system to ensure all data is written to the disk. More...
 
int getSyncMaxBatchSize ()
 Returns the maximum number of events to store before calling sync on the file system to ensure all data is written to the disk. More...
 
void setCacheOnReload (boolean flag)
 When a server restarts it will scan all file based stores and check for corruption. More...
 
void setClientMergeEngineClassname (String name)
 This allows the client to specify the class used to merge events to form one event within the server. More...
 
void setEnableCaching (boolean flag)
 Allows the client to control the caching algorithm within the server, if you set caching to false, all events will be read from the file store else if ther server has room in memory, they will be stored in memory and reused. More...
 
void setEnableReadBuffering (boolean flag)
 Allows the client to control the read buffering logic for the store on the server. More...
 
void setHonorCapacityWhenFull (boolean flag)
 Sets whether the channel / queue capacity setting will prevent publishing of events once full. More...
 
void setMultiFileEventsPerSpindle (int count)
 Sets the number of events that will be stored per individual file for a store. More...
 
void setPerformAutomaticMaintenance (boolean flag)
 Sets whether the store will be have automatic maintenance as events are being removed. More...
 
void setPriority (int newPriority) throws nIllegalArgumentException
 Sets the default message priority for events on this channel. More...
 
void setReadBufferSize (long bufferSize)
 If read buffering is enabled then this allows the client set the number of bytes used for buffering. More...
 
void setStampDictionary (int stampDictionary)
 Configure explicitly the value of the StampDictionary setting of this store. More...
 
void setSyncBatchTime (int time)
 Sets the maximum time (in milliseconds) to store events before calling sync on the file system to ensure all data is written to the disk. More...
 
void setSyncMaxBatchSize (int size)
 Sets the maximum number of events to store before calling sync on the file system to ensure all data is written to the disk. More...
 
void setSyncOnEachWrite (boolean flag)
 Sets whether each write to the store will also call sync on the file system to ensure all data is written to the Disk. More...
 

Detailed Description

Class that contains additional properties that can be set on the channel or queue.

Member Function Documentation

boolean com.pcbsys.nirvana.client.nStoreProperties.canSyncOnEachWrite ( )

Whether each write to the store will also call sync on the file system to ensure all data is written to the Disk.

Returns
true or false
void com.pcbsys.nirvana.client.nStoreProperties.copy ( nStoreProperties  property)

Copies the settings from the parameter to the local isntance.

Parameters
propertyis the nStoreProperties you wish to copy
boolean com.pcbsys.nirvana.client.nStoreProperties.enableMulticast ( )

Returns the status of multicast support for this channel.

Returns
true if multicast is supported for this channel, false otherwise
void com.pcbsys.nirvana.client.nStoreProperties.enableMulticast ( boolean  flag)

Turns on/off multicast support for this channel.

Parameters
flagpass true to enable multicast, false otherwise
boolean com.pcbsys.nirvana.client.nStoreProperties.equals ( Object  obj)

Returns true if the store properties of the two channels are the same.

Parameters
objThe properties of the second channel
boolean com.pcbsys.nirvana.client.nStoreProperties.getCacheOnReload ( )

When a server restarts it will scan all file based stores and check for corruption.

During this test the default behaviour is to disable caching to conserve memory, however, in some instances it would be better if the server had actually cached the events in memory for fast replay.

Returns
The current state, if false (default behaviour) no events are kept in memory during reload
String com.pcbsys.nirvana.client.nStoreProperties.getClientMergeEngineClassname ( )

Returns the currently configured merge class name, if supplied else null.

Returns
Name of class which implements interface nMergeEngineExtension.
boolean com.pcbsys.nirvana.client.nStoreProperties.getEnableCaching ( )

Returns true if the server will cache events in memory or will always refer back to the file backed store.

Used by mixed and persistent store types to improve performance by caching the event in memory. In certian instances this is not desirable and the events should not be cached, some examples would be very large stores where the application will periodically scan from the start to the finish.

Returns
true if enabled, this is the default behaviour
boolean com.pcbsys.nirvana.client.nStoreProperties.getEnableReadBuffering ( )

Returns the current state of read buffering for the store, if true, then reads will be buffered to optimize the I/O access to the file based store.

If false then no buffering will be done and each read will result in a disk I/O, reducing overall performance of the server.

Returns
boolean indicating if read buffering is enabled or not. By default it is enabled
Deprecated:
This method is deprecated since 10.3. Read buffering is always enabled per default.
boolean com.pcbsys.nirvana.client.nStoreProperties.getHonorCapacityWhenFull ( )

Whether the channel / queue capacity setting will prevent publishing of any more data once full.

If true, the client will get an exception on further publishes

Returns
true or false
int com.pcbsys.nirvana.client.nStoreProperties.getMultiFileEventsPerSpindle ( )

Returns the number of events that are stored per individual files for a single store.

Returns
The number of events per file spindle
boolean com.pcbsys.nirvana.client.nStoreProperties.getPerformAutomaticMaintenance ( )

Whether the store will be have automatic maintenance as events are being removed.

Returns
true or false
int com.pcbsys.nirvana.client.nStoreProperties.getPriority ( )

Returns the priority of this channel.

Returns
An integer priority for this channel
long com.pcbsys.nirvana.client.nStoreProperties.getReadBufferSize ( )

If ReadBuffering is enabled then this function returns the size in bytes of the buffer to use.

Returns
The number of bytes to use for buffering reads for the store
Deprecated:
This method is deprecated since 10.3. Stores will always use the global "StoreReadBufferSize" realm configuration.
int com.pcbsys.nirvana.client.nStoreProperties.getStampDictionary ( )

Get the StampDictionary setting value of this store.

Returns
  • com.pcbsys.nirvana.client.nChannelAttributes::DICTIONARY_STAMPING_ENABLED if dictionary stamping is explicitly enabled for this channel
  • com.pcbsys.nirvana.client.nChannelAttributes::DICTIONARY_STAMPING_DISABLED if dictionary stamping is explicitly disabled for this channel
  • com.pcbsys.nirvana.client.nChannelAttributes::DICTIONARY_STAMPING_DEFAULT if dictionary stamping is not explicitly configured for this channel (the server will behave according to the default (server-wide) configuration setting)
int com.pcbsys.nirvana.client.nStoreProperties.getSyncBatchTime ( )

Returns the maximum time (in milliseconds) to store events before calling sync on the file system to ensure all data is written to the disk.

Returns
true or false
int com.pcbsys.nirvana.client.nStoreProperties.getSyncMaxBatchSize ( )

Returns the maximum number of events to store before calling sync on the file system to ensure all data is written to the disk.

Returns
number of events
void com.pcbsys.nirvana.client.nStoreProperties.setCacheOnReload ( boolean  flag)

When a server restarts it will scan all file based stores and check for corruption.

During this test the default behaviour is to disable caching to conserve memory, however, in some instances it would be better if the server had actually cached the events in memory for fast replay. This function allows the client to override the default behaviour for the store and get the events to be cached

Parameters
flagto set the cache on reload to.
void com.pcbsys.nirvana.client.nStoreProperties.setClientMergeEngineClassname ( String  name)

This allows the client to specify the class used to merge events to form one event within the server.

The class must implement the interface nMergeEngineExtension and the channel must have the merge engine active else this will not be used by the server

Parameters
nameof the class to use
void com.pcbsys.nirvana.client.nStoreProperties.setEnableCaching ( boolean  flag)

Allows the client to control the caching algorithm within the server, if you set caching to false, all events will be read from the file store else if ther server has room in memory, they will be stored in memory and reused.

Only applicable for mixed and persistent stores

Parameters
flagtrue to enable caching (default behaviour)
void com.pcbsys.nirvana.client.nStoreProperties.setEnableReadBuffering ( boolean  flag)

Allows the client to control the read buffering logic for the store on the server.

If true then the server will optimize its reading of the file based store and reduce the number of disk I/O's performed. Only works on file backed stores like mixed and persistent.

Parameters
flagto enable/disable the read buffering
Deprecated:
This method is deprecated since 10.3. Read buffering is always enabled per default.
void com.pcbsys.nirvana.client.nStoreProperties.setHonorCapacityWhenFull ( boolean  flag)

Sets whether the channel / queue capacity setting will prevent publishing of events once full.

If true, the client will get an exception on further publishes

Parameters
flagtrue and no more events after max events will be published
void com.pcbsys.nirvana.client.nStoreProperties.setMultiFileEventsPerSpindle ( int  count)

Sets the number of events that will be stored per individual file for a store.

Setting this number too low will create to many files and utilise a large number of file descriptors

Parameters
countThe number of events per individual file
void com.pcbsys.nirvana.client.nStoreProperties.setPerformAutomaticMaintenance ( boolean  flag)

Sets whether the store will be have automatic maintenance as events are being removed.

Parameters
flagtrue or false
void com.pcbsys.nirvana.client.nStoreProperties.setPriority ( int  newPriority) throws nIllegalArgumentException

Sets the default message priority for events on this channel.

Parameters
newPriorityan integer priority between 1 and 10, where 10 is the highest priority.
Exceptions
IllegalArgumentExceptionif the value of newPriority is not between 1 and 10, this exception will be thrown.
void com.pcbsys.nirvana.client.nStoreProperties.setReadBufferSize ( long  bufferSize)

If read buffering is enabled then this allows the client set the number of bytes used for buffering.

By default the server uses 10K. If set under 1024 bytes, this will be set to the default value.

Parameters
bufferSizenumber of bytes to use
Deprecated:
This method is deprecated since 10.3. Stores will always use the global "StoreReadBufferSize" realm configuration.
void com.pcbsys.nirvana.client.nStoreProperties.setStampDictionary ( int  stampDictionary)

Configure explicitly the value of the StampDictionary setting of this store.

This configuration setting will override the default server behavior when processing events on this channel.

Parameters
stampDictionarythe new value of the configuration setting. Valid values are:
  • com.pcbsys.nirvana.client.nChannelAttributes::DICTIONARY_STAMPING_ENABLED to explicitly enable dictionary stamping for this channel
  • com.pcbsys.nirvana.client.nChannelAttributes::DICTIONARY_STAMPING_DISABLED to explicitly disable dictionary stamping for this channel
  • com.pcbsys.nirvana.client.nChannelAttributes::DICTIONARY_STAMPING_DEFAULT to configure this channel to fall back to the default (server-wide) configuration setting
void com.pcbsys.nirvana.client.nStoreProperties.setSyncBatchTime ( int  time)

Sets the maximum time (in milliseconds) to store events before calling sync on the file system to ensure all data is written to the disk.

Parameters
timevalue between 1 and 1000
void com.pcbsys.nirvana.client.nStoreProperties.setSyncMaxBatchSize ( int  size)

Sets the maximum number of events to store before calling sync on the file system to ensure all data is written to the disk.

Parameters
sizevalue between 1 and 1000;
void com.pcbsys.nirvana.client.nStoreProperties.setSyncOnEachWrite ( boolean  flag)

Sets whether each write to the store will also call sync on the file system to ensure all data is written to the Disk.

Parameters
flagtrue or false