![]() |
OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
#include "CorePolicy.hpp"
This QosPolicy controls the behaviour of the durability service regarding transient and persistent data.
Value | Meaning | Concerns | RxO | Changeable |
---|---|---|---|---|
A duration: service_cleanup_delay | Specifies how long the durability service must wait before it is allowed to remove the information on the transient or persistent topic data-instances as a result of incoming dispose messages. | Topic, DataWriter | No | No |
A HistoryQosPolicyKind: history_kind | Specifies the type of history, which may be KEEP_LAST_HISTORY_QOS or KEEP_ALL_HISTORY_QOS, the durability service must apply for the transient or persistent topic data-instances. | |||
A long: history_depth | Specifies the number of samples of each instance of data (identified by its key) that is managed by the durability service for the transient or persistent topic data-instances. If history_kind is KEEP_LAST_HISTORY_QOS, history_depth must be smaller than or equal to max_samples_per_instance for this QosPolicy to be consistent. | |||
A long: max_samples | Specifies the maximum number of data-samples the DataWriter (or DataReader) can manage across all the instances associated with it. Represents the maximum samples the middleware can store for any one DataWriter (or DataReader). It is inconsistent for this value to be less than max_samples_per_instance. By default, LENGTH_UNLIMITED. | |||
A long: max_instances | Represents the maximum number of instances DataWriter (or DataReader) can manage. By default, LENGTH_UNLIMITED. | |||
A long: max_samples_per_instance | Represents the maximum number of samples of any one instance a DataWriter (or DataReader) can manage. It is inconsistent for this value to be greater than max_samples. By default, LENGTH_UNLIMITED. |
This QosPolicy controls the behaviour of the durability service regarding transient and persistent data. It controls for the transient or persistent topic; the time at which information regarding the topic may be discarded, the history policy it must set and the resource limits it must apply.
The setting of the DurabilityServiceQosPolicy only applies when kind of the DurabilityQosPolicy is either TRANSIENT_DURABILITY_QOS or PERSISTENT_DURABILITY_QOS. The service_cleanup_delay setting controls at which time the durability service” is allowed to remove all information regarding a data-instance. Information on a data-instance is maintained until the following conditions are met:
The use of the attribute service_cleanup_delay is apparent in the situation where an application disposes of an instance and it crashes before having a chance to complete additional tasks related to the disposition. Upon re-start the application may ask for initial data to regain its state and the delay introduced by the service_cleanup_delay allows the re-started application to receive the information on the disposed of instance and complete the interrupted tasks.
The attributes history_kind and history_depth apply to the history settings of the durability service’s internal DataWriter and DataReader managing the topic. The HistoryQosPolicy behaviour, applies to these attributes.
The attributes max_samples, max_instances and max_samples_per_instance apply to the resource limits of the Durability Service’s internal DataWriter and DataReader managing the topic. The ResourceLimitsQosPolicy behaviour, applies to these attributes.
Definition at line 1529 of file CorePolicy.hpp.
dds::core::policy::DurabilityService::DurabilityService | ( | const dds::core::Duration & | service_cleanup_delay = dds::core::Duration::zero() , |
dds::core::policy::HistoryKind::Type | history_kind = dds::core::policy::HistoryKind::KEEP_LAST , |
||
int32_t | history_depth = 1 , |
||
int32_t | max_samples = dds::core::LENGTH_UNLIMITED , |
||
int32_t | max_instances = dds::core::LENGTH_UNLIMITED , |
||
int32_t | max_samples_per_instance = dds::core::LENGTH_UNLIMITED |
||
) |
Creates a DurabilityService QoS instance
service_cleanup_delay | the service_cleanup_delay |
history_kind | the history_kind value |
history_depth | the history_depth value |
max_samples | the max_samples value |
max_instances | the max_instances value |
max_samples_per_instance | the max_samples_per_instance value |
Definition at line 940 of file CorePolicyImpl.hpp.
dds::core::policy::DurabilityService::DurabilityService | ( | const DurabilityService & | other | ) |
Copies a DurabilityService QoS instance
other | the DurabilityService QoS instance to copy |
Definition at line 955 of file CorePolicyImpl.hpp.
DurabilityService & dds::core::policy::DurabilityService::history_depth | ( | int32_t | history_depth | ) |
Sets the history_depth value
history_depth | the history_depth value |
Definition at line 985 of file CorePolicyImpl.hpp.
int32_t dds::core::policy::DurabilityService::history_depth | ( | ) | const |
Gets the history_depth value
Definition at line 992 of file CorePolicyImpl.hpp.
DurabilityService & dds::core::policy::DurabilityService::history_kind | ( | dds::core::policy::HistoryKind::Type | history_kind | ) |
dds::core::policy::HistoryKind::Type dds::core::policy::DurabilityService::history_kind | ( | ) | const |
DurabilityService & dds::core::policy::DurabilityService::max_instances | ( | int32_t | max_instances | ) |
Sets the max_instances value
max_instances | the max_instances value |
Definition at line 1011 of file CorePolicyImpl.hpp.
int32_t dds::core::policy::DurabilityService::max_instances | ( | ) | const |
Gets the max_instances value
Definition at line 1018 of file CorePolicyImpl.hpp.
DurabilityService & dds::core::policy::DurabilityService::max_samples | ( | int32_t | max_samples | ) |
Sets the max_samples value
max_samples | the max_samples value |
Definition at line 998 of file CorePolicyImpl.hpp.
int32_t dds::core::policy::DurabilityService::max_samples | ( | ) | const |
Gets the max_samples value
Definition at line 1005 of file CorePolicyImpl.hpp.
DurabilityService & dds::core::policy::DurabilityService::max_samples_per_instance | ( | int32_t | max_samples_per_instance | ) |
Sets the max_samples_per_instance value
max_samples_per_instance | the max_samples_per_instance value |
Definition at line 1024 of file CorePolicyImpl.hpp.
int32_t dds::core::policy::DurabilityService::max_samples_per_instance | ( | ) | const |
Gets the max_samples_per_instance value
Definition at line 1031 of file CorePolicyImpl.hpp.
|
inherited |
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:
|
inherited |
DurabilityService & dds::core::policy::DurabilityService::service_cleanup_delay | ( | const dds::core::Duration & | service_cleanup_delay | ) |
Sets the service_cleanup_delay value
service_cleanup_delay | the service_cleanup_delay value |
Definition at line 959 of file CorePolicyImpl.hpp.
const dds::core::Duration dds::core::policy::DurabilityService::service_cleanup_delay | ( | ) | const |
Gets the service_cleanup_delay value
Definition at line 966 of file CorePolicyImpl.hpp.