com::pcbsys::nirvana::client::nStoreProperties Class Reference

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

#include <nStoreProperties.h>

Public Member Functions

bool canSyncOnEachWrite ()
 Whether each write to the store will also call sync on the file system to ensure all data is written to the Disk.
 
bool getCacheOnReload ()
 When a server restarts it will scan all file based stores and check for corruption.
 
std::string getClientMergeEngineClassname ()
 Returns the currently configured merge class name, if supplied else null.
 
bool getEnableCaching ()
 Returns true if the server will cache events in memory or will always refer back to the file backed store.
 
bool getHonorCapacityWhenFull ()
 Whether the channel / queue capacity setting will prevent publishing of any more data once full.
 
int getMultiFileEventsPerSpindle ()
 Returns the number of events that are stored per individual files for a single store.
 
bool getPerformAutomaticMaintenance ()
 Whether the store will be have automatic maintenance as events are being removed.
 
unsigned int getPriority ()
 Returns the priority for the associated resource.
 
int getStampDictionary ()
 Get the StampDictionary setting value of this store.
 
int getSyncBatchTime ()
 Whether each write to the store will also call sync on the file system to ensure all data is written to the Disk.
 
int getSyncMaxBatchSize ()
 Whether each write to the store will also call sync on the file system to ensure all data is written to the Disk.
 
void setCacheOnReload (bool 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.
 
void setClientMergeEngineClassname (const std::string &mergeEngineClass)
 This allows the client to specify the class used to merge events to form one event within the server.
 
void setEnableCaching (bool 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.
 
void setHonorCapacityWhenFull (bool flag)
 Sets whether the channel / queue capacity setting will prevent publishing of events once full.
 
void setMultiFileEventsPerSpindle (unsigned int count)
 Sets the number of events that will be stored per individual file for a store.
 
void setPerformAutomaticMaintenance (bool flag)
 Sets whether the store will be have automatic maintenance as events are being removed.
 
void setPriority (unsigned int newPriority)
 Sets the default message priority for events on this channel.
 
void setStampDictionary (int stampDictionary)
 Configure explicitly the value of the StampDictionary setting of this store.
 
void setSyncBatchTime (int size)
 Sets whether each write to the store will also call sync on the file system to ensure all data is written to the Disk.
 
void setSyncMaxBatchSize (int size)
 Sets whether each write to the store will also call sync on the file system to ensure all data is written to the Disk.
 
void setSyncOnEachWrite (bool 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.
 

Detailed Description

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

Member Function Documentation

◆ canSyncOnEachWrite()

bool 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

◆ getCacheOnReload()

bool 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

◆ getClientMergeEngineClassname()

std::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.
See also
com.pcbsys.nirvana.server.plugins.extensions.mergeEngine.nMergeEngineExtension

◆ getEnableCaching()

bool 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 certain 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

◆ getHonorCapacityWhenFull()

bool 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

◆ getMultiFileEventsPerSpindle()

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

◆ getPerformAutomaticMaintenance()

bool com::pcbsys::nirvana::client::nStoreProperties::getPerformAutomaticMaintenance ( )

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

Returns
true or false

◆ getPriority()

unsigned int com::pcbsys::nirvana::client::nStoreProperties::getPriority ( )

Returns the priority for the associated resource.

Returns
an integer between 0 and 9, representing the inherited priority for events on this channel

◆ getStampDictionary()

int com::pcbsys::nirvana::client::nStoreProperties::getStampDictionary ( )

Get the StampDictionary setting value of this store.

Returns

◆ getSyncBatchTime()

int com::pcbsys::nirvana::client::nStoreProperties::getSyncBatchTime ( )

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

◆ getSyncMaxBatchSize()

int com::pcbsys::nirvana::client::nStoreProperties::getSyncMaxBatchSize ( )

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

◆ setCacheOnReload()

void com::pcbsys::nirvana::client::nStoreProperties::setCacheOnReload ( bool  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)

◆ setClientMergeEngineClassname()

void com::pcbsys::nirvana::client::nStoreProperties::setClientMergeEngineClassname ( const std::string &  mergeEngineClass)

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

◆ setEnableCaching()

void com::pcbsys::nirvana::client::nStoreProperties::setEnableCaching ( bool  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)

◆ setHonorCapacityWhenFull()

void com::pcbsys::nirvana::client::nStoreProperties::setHonorCapacityWhenFull ( bool  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

◆ setMultiFileEventsPerSpindle()

void com::pcbsys::nirvana::client::nStoreProperties::setMultiFileEventsPerSpindle ( unsigned 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

◆ setPerformAutomaticMaintenance()

void com::pcbsys::nirvana::client::nStoreProperties::setPerformAutomaticMaintenance ( bool  flag)

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

Parameters
flagtrue or false

◆ setPriority()

void com::pcbsys::nirvana::client::nStoreProperties::setPriority ( unsigned int  newPriority)

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.

◆ setStampDictionary()

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:

◆ setSyncBatchTime()

void com::pcbsys::nirvana::client::nStoreProperties::setSyncBatchTime ( int  size)

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
timetrue or false

◆ setSyncMaxBatchSize()

void com::pcbsys::nirvana::client::nStoreProperties::setSyncMaxBatchSize ( int  size)

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
sizevalue between 1 and 1000;

◆ setSyncOnEachWrite()

void com::pcbsys::nirvana::client::nStoreProperties::setSyncOnEachWrite ( bool  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