Functions |
|
RDM_RETCODE | rdm_rdmAllocTFS (const RDM_TCHAR_T *optString, RDM_TFS *phTFS) |
Allocate the TFS handle. More... | |
RDM_RETCODE | rdm_rdmAllocTFSWithMemBuf (const RDM_TCHAR_T *optString, void *pMemBuf, size_t memSize, RDM_TFS *phTFS) |
Allocate the TFS with an associated memory buffer. More... | |
Detailed Description
The TFS instantiation API. The functions here are located in \ref lib_tfs. Linker option:\ <pre><code> -l<tt><a href="lib_tfs.html">rdmtfs</a></tt></code></pre>
Function Documentation
rdm_rdmAllocTFS()
RDM_RETCODE rdm_rdmAllocTFS | ( | const RDM_TCHAR_T * | optString, |
RDM_TFS * | phTFS | ||
) |
#include <rdmrdmapi.h>
Allocate the TFS handle.
This function will initialize the TFS service with specified option values and return its handle. The optString is a semicolon-delimited list of key/value pairs. Each pair is specified in the form of "key=value". There are two main categories of options that can be set - options for the RDM_TFS instance, and database default values.
TFS instance options determine the general behaviour of the RDM_TFS handle. The tfstype option sets the type of the RDM_TFS handle. Other options take effect only when the RDM_TFS handle includes an embedded TFS.
- The TFS instance option keys supported in optString are:
Options are defined using keys or properties. Every key has a name and a value, delimited by an equals sign (=). The key name appears to the left of the equals sign. Key names are not case-sensitive. Unless otherwise noted, values are not case-sensitive.
Key | Value Description |
---|---|
tfstype | Specify the type of TFS to be used. |
docroot | Specify the Document Root directory. |
listen | Enable the listener for remote TFS connections. |
readonly | Read-only mode for TFS. |
diskless | Diskless mode for TFS |
sharedmem | Enable shared memory communication protocol. |
tcp | Enable TCP/IP communication protocol. |
name | Specify TCP/IP port or shared memory protocol name. |
verbose | Enable verbose logging. |
logfile | Specify TFS log file. |
stdout_file | Specify alternate stdout output file name. |
keep_alive_on | Enable TCP keepalives for tcp communication. |
Database configuration options determine the way the TFS instance manages its databases. These options affect only the RDM_TFS handle that includes an embedded TFS.
The keys supported in optString are:
Options are defined using keys or properties. Every key has a name and a value, delimited by an equals sign (=). The key name appears to the left of the equals sign. Key names are not case-sensitive. Unless otherwise noted, values are not case-sensitive.
Key | Value Description |
---|---|
timeout | Specify default lock timeout in seconds. |
time_zone | Specify current time zone. |
storage | Specify database storage mode. |
cache_size | Specify cache size. |
item_format | Specify row storage form. |
locale | Specify database locale. |
error_format | Specify error message format. |
durability | Specify database transaction safety level. |
pack_file_size | Specify pack file maximum size. |
db_size | Specify the maximum database size allocation. |
vacuum_percentage | Specify the vacuum trigger level for pack files. |
vacuum_write_chunk_size | Specify the vacuum scan size for pack files. |
vacuum_read_chunk_size | Specify the vacuum write size for pack files. |
idindex_flush_threshold_on_close | Specify the threshold for flushing the ID-index when the last database user closes the database. |
idindex_flush_threshold | Specify the threshold for flushing the ID-index. |
idindex_cache_size | Specify the size of the ID-index cache in byte. |
- Note
- Database configuration options can also be set using rdm_tfsSetOption or rdm_tfsSetOptions, in which case those option values will be inherited by the RDM_DB handles allocated off this RDM_TFS handle, preceding the default values stored in the RDM_TFS handle.
- Return values
-
sOKAY Normal, successful return. eTFS_DOCROOTINVALID The specified docroot location is invalid. eTFS_DOCROOTNOTFOUND The specified docroot location is not found. eTFS_DOCROOTUSED The specified docroot is already in use. eINVOPTION Invalid option is specified. eINVOPTIONVALUE Invalid option value. eNOMEMORY Out of memory.
- See also
- rdm_rdmAllocTFSWithMemBuf
- rdm_tfsEnableListener
- rdm_tfsPing
- rdm_tfsAllocEncrypt
- rdm_tfsSetOptions
- rdm_tfsAllocDatabase
- rdm_tfsDropDatabase
- rdm_tfsKillAllRemoteConnections
- rdm_tfsGetMemUsage
- rdm_tfsFree
- Parameters
-
[in] optString [in] option string [out] phTFS [out] TFS handle
rdm_rdmAllocTFSWithMemBuf()
RDM_RETCODE rdm_rdmAllocTFSWithMemBuf | ( | const RDM_TCHAR_T * | optString, |
void * | pMemBuf, | ||
size_t | memSize, | ||
RDM_TFS * | phTFS | ||
) |
#include <rdmrdmapi.h>
Allocate the TFS with an associated memory buffer.
Allocate the TFS handle and use the associated memory buffer instead of malloc for memory requests. If no memory buffer is specified and memSize is greater than 0 memSize will serve as the memory limit for the TFS, but memory will be obtained via calls to malloc.
- Note
- Until further notice the buffer provided and the size requested will be used for all TFS handles. This function should only be used once for allocating the first TFS handle. This semantic is subject to change.
This function will initialize the TFS service with specified option values and return its handle. The optString is a key/value pair in the form of "key=value".
- The keys supported in optString are:
Options are defined using keys or properties. Every key has a name and a value, delimited by an equals sign (=). The key name appears to the left of the equals sign. Key names are not case-sensitive. Unless otherwise noted, values are not case-sensitive.
Key | Value Description |
---|---|
tfstype | Specify the type of TFS to be used. |
docroot | Specify the Document Root directory. |
listen | Enable the listener for remote TFS connections. |
readonly | Read-only mode for TFS. |
diskless | Diskless mode for TFS |
sharedmem | Enable shared memory communication protocol. |
tcp | Enable TCP/IP communication protocol. |
name | Specify TCP/IP port or shared memory protocol name. |
verbose | Enable verbose logging. |
logfile | Specify TFS log file. |
stdout_file | Specify alternate stdout output file name. |
keep_alive_on | Enable TCP keepalives for tcp communication. |
- Note
-
Database configuration options can be set using this function and will be inherited by the database handle at the time it is allocated. For example, the
"durability=consistent"
option can be set using this function and it will be inherited by the next RDM_DB handle allocated using this RDM_TFS handle. See Database Configuration Options for the list of valid database configuration option keys.
- Return values
-
sOKAY Normal, successful return. eTFS_DOCROOTINVALID The specified docroot location is invalid. eTFS_DOCROOTNOTFOUND The specified docroot location is not found. eTFS_DOCROOTUSED The specified docroot is already in use. eINVOPTION Invalid option is specified. eINVOPTIONVALUE Invalid option value. eNOMEMORY Out of memory.
- See also
- rdm_rdmAllocTFS
- rdm_tfsGetMemUsage
- Parameters
-
[in] optString [in] option string [in] pMemBuf [in] The memory buffer to use instead of getting memory from malloc [in] memSize [in] The memory size limit (size of pMemBuf if pMemBuf is not NULL) [out] phTFS [out] TFS handle