Qorus Integration Engine®  4.0.3.p2_git
OMQ::FsSendStreamConfig Class Reference

filesystem send stream base config class More...

Inheritance diagram for OMQ::FsSendStreamConfig:
OMQ::StreamConfig OMQ::QueuedBlockConfigBase

Public Member Methods

 constructor (string remote, string path, *hash options)
 creates the configuration object from the arguments
 
 constructor (QorusSystemRestHelper remote, string path, *hash options)
 creates the configuration object from the arguments
 
private setFsSendOptions (string path, *hash options)
 sets configuration options
 
string path ()
 returns the path
 
int mode ()
 returns the file mode
 
string encoding ()
 returns the file's character encoding
 
private int getDefaultBlockSize ()
 returns the default block size for this object (16384)
 
 logStreamConfigImpl (string what, string url)
 logs the stream configuration when created
 
 updatePath (string path)
 updates the stored path
 
- Public Member Methods inherited from OMQ::StreamConfig
 constructor (string stream, string remote, *hash options)
 constructor taking a string giving the name of the remote connection for the remote server More...
 
 constructor (string stream, QorusSystemRestHelper remote, *hash options)
 constructor taking an OMQ::QorusSystemRestHelper object for the remote connection More...
 
 logStreamConfig (string what)
 logs the stream configuration when created
 
 logStreamConfigImpl (string what, string url)
 logs the stream configuration when created
 
private setOptions (*hash options)
 sets configuration values from an optional option hash
 
string stream ()
 returns the stream name
 
string streamDesc ()
 returns a description of the stream for error reporting
 
QorusSystemRestHelper remote ()
 returns the remote connection object (see OMQ::QorusSystemRestHelper)
 
timeout timeout ()
 returns the timeout value in milliseconds
 
int block ()
 returns the block size
 
bool suppressRemoteTimeout ()
 returns True if no "timeout" option should be sent to the remote
 
 update (string stream, *hash options)
 updates the configuration for a new stream
 
private int getDefaultBlockSize ()
 returns the default block size for this object (1000)
 
- Public Member Methods inherited from OMQ::QueuedBlockConfigBase
 constructor (*hash options)
 creates the object and assigns config info
 
*int queueBlockSize ()
 returns the queue block size
 
int queueTimeout ()
 returns the queue timeout in milliseconds
 
 update (*hash options)
 updates options
 

Private Attributes

string m_path
 target path
 
softint m_mode = 0644
 target file creation mode (unix privs.); default: 0644
 
string m_encoding = get_default_encoding()
 target file encoding
 
const MinBlockSize = 4096
 minimum block size in bytes
 
- Private Attributes inherited from OMQ::StreamConfig
string m_stream
 no public members More...
 
QorusSystemRestHelper m_remote
 real remote rest helper
 
timeout m_timeout = 5m
 timeout for rest connections
 
bool m_no_remote_timeout = False
 flag to suppress sending the timeout option to the remote
 
int m_logLevel = LL_INFO
 default log level; default LL_INFO
 
softint m_block
 block size
 
- Private Attributes inherited from OMQ::QueuedBlockConfigBase
*softint m_queue_block_size = 2
 data queue block size; the number of blocks to queue for sending before the main data thread will block; default: 2
 
timeout m_queue_timeout = 5m
 queue timeout; maximum amount of time a message can wait for the queue to become free; default: 5m
 
const MinQueueBlockSize = 2
 minimum queue block size
 

Detailed Description

filesystem send stream base config class

This class creates a background thread that handles the socket I/O so that socket I/O can be executed in parallel to the main data acquisition thread (the thread that creates the object).

There is a Queue object that passes aggregated row data to the send thread; the default Queue size is 2 (representing a number of blocks), which allows 2 blocks of data to be queued before the internal private method FsRemoteSend::submitImpl() (called implicitly by FsRemoteSend::append()) will block.

If the Queue size is 2 and the block size is 4096 then at most 8192 bytes will be queued for sending before the main thread will block in the internal private method FsRemoteSend::submitImpl().

This allows the main data acquisition thread to stay loosely in sync with the I/O thread so that memory usage is optimized and furthermore serves to avoid stalling the I/O thread due to lack of data.


The documentation for this class was generated from the following file: