- com
- pcbsys
- nirvana
- client
- nStoreProperties
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. More... | |
bool | getCacheOnReload () |
When a server restarts it will scan all file based stores and check for corruption. More... | |
std::string | getClientMergeEngineClassname () |
Returns the currently configured merge class name, if supplied else null. More... | |
bool | getEnableCaching () |
Returns true if the server will cache events in memory or will always refer back to the file backed store. More... | |
UM_DEPRECATED bool | 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... | |
bool | 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... | |
bool | getPerformAutomaticMaintenance () |
Whether the store will be have automatic maintenance as events are being removed. More... | |
unsigned int | getPriority () |
Returns the priority for the associated resource. More... | |
UM_DEPRECATED ulonglong | 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 () |
Whether each write to the store will also call sync on the file system to ensure all data is written to the Disk. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
UM_DEPRECATED void | setEnableReadBuffering (bool flag) |
Allows the client to control the read buffering logic for the store on the server. More... | |
void | setHonorCapacityWhenFull (bool flag) |
Sets whether the channel / queue capacity setting will prevent publishing of events once full. More... | |
void | setMultiFileEventsPerSpindle (unsigned int count) |
Sets the number of events that will be stored per individual file for a store. More... | |
void | setPerformAutomaticMaintenance (bool flag) |
Sets whether the store will be have automatic maintenance as events are being removed. More... | |
void | setPriority (unsigned int newPriority) |
Sets the default message priority for events on this channel. More... | |
UM_DEPRECATED void | setReadBufferSize (ulonglong size) |
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 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. More... | |
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. More... | |
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. More... | |
Class that contains additional properties that can be set on the channel or queue.
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.
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.
std::string com::pcbsys::nirvana::client::nStoreProperties::getClientMergeEngineClassname | ( | ) |
Returns the currently configured merge class name, if supplied else null.
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.
UM_DEPRECATED bool 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.
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
int com::pcbsys::nirvana::client::nStoreProperties::getMultiFileEventsPerSpindle | ( | ) |
Returns the number of events that are stored per individual files for a single store.
bool com::pcbsys::nirvana::client::nStoreProperties::getPerformAutomaticMaintenance | ( | ) |
Whether the store will be have automatic maintenance as events are being removed.
unsigned int com::pcbsys::nirvana::client::nStoreProperties::getPriority | ( | ) |
Returns the priority for the associated resource.
UM_DEPRECATED ulonglong com::pcbsys::nirvana::client::nStoreProperties::getReadBufferSize | ( | ) |
If ReadBuffering is enabled then this function returns the size in bytes of the buffer to use.
int com::pcbsys::nirvana::client::nStoreProperties::getStampDictionary | ( | ) |
Get the StampDictionary setting value of this store.
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 | ( | ) |
Whether each write to the store will also call sync on the file system to ensure all data is written to the Disk.
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.
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
flag | true to enable caching (default behaviour) |
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
name | of the class to use |
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
flag | true to enable caching (default behaviour) |
UM_DEPRECATED void com::pcbsys::nirvana::client::nStoreProperties::setEnableReadBuffering | ( | bool | 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.
flag | to enable/disable the read buffering |
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
flag | true and no more events after max events will be published |
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
count | The number of events per individual file |
void com::pcbsys::nirvana::client::nStoreProperties::setPerformAutomaticMaintenance | ( | bool | flag | ) |
Sets whether the store will be have automatic maintenance as events are being removed.
flag | true or false |
void com::pcbsys::nirvana::client::nStoreProperties::setPriority | ( | unsigned int | newPriority | ) |
Sets the default message priority for events on this channel.
newPriority | an integer priority between 1 and 10, where 10 is the highest priority. |
IllegalArgumentException | if the value of newPriority is not between 1 and 10, this exception will be thrown. |
UM_DEPRECATED void com::pcbsys::nirvana::client::nStoreProperties::setReadBufferSize | ( | ulonglong | size | ) |
If read buffering is enabled then this allows the client set the number of bytes used for buffering.
By default the server uses 10K
bufferSize | number of bytes to use |
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.
stampDictionary | the new value of the configuration setting. Valid values are:
|
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.
time | true or false |
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.
size | value between 1 and 1000; |
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.
flag | true or false |