RTI Connext Modern C++ API  Version 5.3.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rti::core::policy::Database Class Reference

<<extension>> Configures threads and resource limits that RTI Connext uses to control its internal database More...

#include <rti/core/policy/CorePolicy.hpp>

Public Member Functions

Databasethread (const rti::core::ThreadSettings &the_thread)
 Sets the thread settings.
 
const rti::core::ThreadSettingsthread () const
 Gets the thread settings (by const reference)
 
rti::core::ThreadSettingsthread ()
 Gets the thread settings by reference.
 
Databaseshutdown_timeout (const dds::core::Duration &the_shutdown_timeout)
 
dds::core::Duration shutdown_timeout () const
 Getter (see setter with the same name)
 
Databasecleanup_period (const dds::core::Duration &the_cleanup_period)
 
dds::core::Duration cleanup_period () const
 Getter (see setter with the same name)
 
Databaseshutdown_cleanup_period (const dds::core::Duration &period)
 
dds::core::Duration shutdown_cleanup_period () const
 Getter (see setter with the same name)
 
Databaseinitial_records (int32_t the_initial_records)
 
int32_t initial_records () const
 Getter (see setter with the same name)
 
Databasemax_skiplist_level (int32_t the_max_skiplist_level)
 
Databasemax_weak_references (int32_t the_max_weak_references)
 
int32_t max_weak_references () const
 Getter (see setter with the same name)
 
Databaseinitial_weak_references (int32_t the_initial_weak_references)
 
int32_t initial_weak_references () const
 Getter (see setter with the same name)
 

Detailed Description

<<extension>> Configures threads and resource limits that RTI Connext uses to control its internal database

RTI uses an internal in-memory "database" to store information about entities created locally as well as remote entities found during the discovery process. This database uses a background thread to garbage-collect records related to deleted entities. When the dds::domain::DomainParticipant that maintains this database is deleted, it shuts down this thread.

The Database QoS policy is used to configure how RTI Connext manages its database, including how often it cleans up, the priority of the database thread, and limits on resources that may be allocated by the database.

You may be interested in modifying the rti::core::policy::Database::shutdown_timeout and rti::core::policy::Database::shutdown_cleanup_period parameters to decrease the time it takes to delete a dds::domain::DomainParticipant when your application is shutting down.

The rti::core::policy::DomainParticipantResourceLimits controls the memory allocation for elements stored in the database.

This QoS policy is an extension to the DDS standard.

Entity:
dds::domain::DomainParticipant
Properties:
RxO = N/A
Changeable NO

Member Function Documentation

Database& rti::core::policy::Database::thread ( const rti::core::ThreadSettings the_thread)

Sets the thread settings.

There is only one database thread: the clean-up thread.

[default] Priority: LOW.
The actual value depends on your architecture:

For Windows: -3
For Linux: OS default priority
For a complete list of platform specific values, please refer to Platform Notes.

[default] Stack Size: The actual value depends on your architecture:

For Windows: OS default stack size
For Linux: OS default stack size
For a complete list of platform specific values, please refer to Platform Notes.

[default] Mask: rti::core::ThreadSettingsKindMask::stdio()

const rti::core::ThreadSettings& rti::core::policy::Database::thread ( ) const

Gets the thread settings (by const reference)

rti::core::ThreadSettings& rti::core::policy::Database::thread ( )

Gets the thread settings by reference.

See Also
thread(const rti::core::ThreadSettings&)
Database& rti::core::policy::Database::shutdown_timeout ( const dds::core::Duration the_shutdown_timeout)

The domain participant will exit after the timeout, even if the database has not been fully cleaned up.

[default] 15 seconds

[range] [0,dds::core::Duration::infinite()]

dds::core::Duration rti::core::policy::Database::shutdown_timeout ( ) const

Getter (see setter with the same name)

Database& rti::core::policy::Database::cleanup_period ( const dds::core::Duration the_cleanup_period)

[default] 61 seconds

[range] [0,1 year]

dds::core::Duration rti::core::policy::Database::cleanup_period ( ) const

Getter (see setter with the same name)

Database& rti::core::policy::Database::shutdown_cleanup_period ( const dds::core::Duration period)

[default] 1 second

[range] [0,1 year]

dds::core::Duration rti::core::policy::Database::shutdown_cleanup_period ( ) const

Getter (see setter with the same name)

Database& rti::core::policy::Database::initial_records ( int32_t  the_initial_records)

[default] 1024

[range] [1,10 million]

int32_t rti::core::policy::Database::initial_records ( ) const

Getter (see setter with the same name)

Database& rti::core::policy::Database::max_skiplist_level ( int32_t  the_max_skiplist_level)

The skiplist is used to keep records in the database. Usually, the search time is log2(N), where N is the total number of records in one skiplist. However, once N exceeds 2^n, where n is the maximum skiplist level, the search time will become more and more linear. Therefore, the maximum level should be set such that 2^n is larger than the maximum(N among all skiplists). Usually, the maximum N is the maximum number of remote and local writers or readers.

[default] 14

[range] [1,31]

Database& rti::core::policy::Database::max_weak_references ( int32_t  the_max_weak_references)

A weak reference is an internal data structure that refers to a record within RTI Connext' internal database. This field configures the maximum number of such references that RTI Connext may create.

The actual number of weak references is permitted to grow from an initial value (indicated by rti::core::policy::Database::initial_weak_references) to this maximum. To prevent RTI Connext from allocating any weak references after the system has reached a steady state, set the initial and maximum values equal to one another. To indicate that the number of weak references should continue to grow as needed indefinitely, set this field to dds::core::LENGTH_UNLIMITED. Be aware that although a single weak reference occupies very little memory, allocating a very large number of them can have a significant impact on your overall memory usage.

Tuning this value precisely is difficult without intimate knowledge of the structure of RTI Connext' database; doing so is an advanced feature not required by most applications. The default value has been chosen to be sufficient for reasonably large systems. If you believe you may need to modify this value, please consult with RTI support personnel for assistance.

[default] dds::core::LENGTH_UNLIMITED

[range] [1, 100 million] or dds::core::LENGTH_UNLIMITED, >= initial_weak_references

See Also
rti::core::policy::Database::initial_weak_references
int32_t rti::core::policy::Database::max_weak_references ( ) const

Getter (see setter with the same name)

Database& rti::core::policy::Database::initial_weak_references ( int32_t  the_initial_weak_references)

See rti::core::policy::Database::max_weak_references for more information about what a weak reference is.

If the QoS set contains an initial_weak_references value that is too small to ever grow to rti::core::policy::Database::max_weak_references using RTI Connext' internal algorithm, this value will be adjusted upwards as necessary. Subsequent accesses of this value will reveal the actual initial value used.

Changing the value of this field is an advanced feature; it is recommended that you consult with RTI support personnel before doing so.

[default] 2049, which is the minimum initial value imposed by REDA when the maximum is unlimited. If a lower value is specified, it will simply be increased to 2049 automatically.

[range] [1, 100 million], <= max_weak_references

See Also
rti::core::policy::Database::max_weak_references
int32_t rti::core::policy::Database::initial_weak_references ( ) const

Getter (see setter with the same name)


RTI Connext Modern C++ API Version 5.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc