OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
dds::core::policy::DurabilityService Class Reference

More...

#include "CorePolicy.hpp"

Inheritance diagram for dds::core::policy::DurabilityService:
Inheritance graph

Public Member Functions

 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)
 
 DurabilityService (const DurabilityService &other)
 
DurabilityServicehistory_depth (int32_t history_depth)
 
int32_t history_depth () const
 
DurabilityServicehistory_kind (dds::core::policy::HistoryKind::Type history_kind)
 
dds::core::policy::HistoryKind::Type history_kind () const
 
DurabilityServicemax_instances (int32_t max_instances)
 
int32_t max_instances () const
 
DurabilityServicemax_samples (int32_t max_samples)
 
int32_t max_samples () const
 
DurabilityServicemax_samples_per_instance (int32_t max_samples_per_instance)
 
int32_t max_samples_per_instance () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 
DurabilityServiceservice_cleanup_delay (const dds::core::Duration &service_cleanup_delay)
 
const dds::core::Duration service_cleanup_delay () const
 

Detailed Description

This QosPolicy controls the behaviour of the durability service regarding transient and persistent data.

Attributes

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 instance has been explicitly disposed of (instance_state = NOT_ALIVE_DISPOSED_INSTANCE_STATE)
  • The system detects that there are no more “live” DataWriter objects writing the instance, that is, all DataWriter either unregister_instance the instance (call unregister_instance operation) or lose their liveliness
  • A time interval longer than service_cleanup_delay has elapsed since the moment the Data Distribution Service detected that the previous two conditions were 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.

Constructor & Destructor Documentation

◆ DurabilityService() [1/2]

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

Parameters
service_cleanup_delaythe service_cleanup_delay
history_kindthe history_kind value
history_depththe history_depth value
max_samplesthe max_samples value
max_instancesthe max_instances value
max_samples_per_instancethe max_samples_per_instance value

Definition at line 940 of file CorePolicyImpl.hpp.

◆ DurabilityService() [2/2]

dds::core::policy::DurabilityService::DurabilityService ( const DurabilityService other)

Copies a DurabilityService QoS instance

Parameters
otherthe DurabilityService QoS instance to copy

Definition at line 955 of file CorePolicyImpl.hpp.

Member Function Documentation

◆ history_depth() [1/2]

DurabilityService & dds::core::policy::DurabilityService::history_depth ( int32_t  history_depth)

Sets the history_depth value

Parameters
history_depththe history_depth value

Definition at line 985 of file CorePolicyImpl.hpp.

◆ history_depth() [2/2]

int32_t dds::core::policy::DurabilityService::history_depth ( ) const

Gets the history_depth value

Returns
history_depth

Definition at line 992 of file CorePolicyImpl.hpp.

◆ history_kind() [1/2]

DurabilityService & dds::core::policy::DurabilityService::history_kind ( dds::core::policy::HistoryKind::Type  history_kind)

Sets the history_kind

Parameters
thehistory_kind

Definition at line 972 of file CorePolicyImpl.hpp.

◆ history_kind() [2/2]

dds::core::policy::HistoryKind::Type dds::core::policy::DurabilityService::history_kind ( ) const

Gets the history_kind

Returns
history_kind

Definition at line 979 of file CorePolicyImpl.hpp.

◆ max_instances() [1/2]

DurabilityService & dds::core::policy::DurabilityService::max_instances ( int32_t  max_instances)

Sets the max_instances value

Parameters
max_instancesthe max_instances value

Definition at line 1011 of file CorePolicyImpl.hpp.

◆ max_instances() [2/2]

int32_t dds::core::policy::DurabilityService::max_instances ( ) const

Gets the max_instances value

Returns
the max_instances value

Definition at line 1018 of file CorePolicyImpl.hpp.

◆ max_samples() [1/2]

DurabilityService & dds::core::policy::DurabilityService::max_samples ( int32_t  max_samples)

Sets the max_samples value

Parameters
max_samplesthe max_samples value

Definition at line 998 of file CorePolicyImpl.hpp.

◆ max_samples() [2/2]

int32_t dds::core::policy::DurabilityService::max_samples ( ) const

Gets the max_samples value

Returns
the max_samples value

Definition at line 1005 of file CorePolicyImpl.hpp.

◆ max_samples_per_instance() [1/2]

DurabilityService & dds::core::policy::DurabilityService::max_samples_per_instance ( int32_t  max_samples_per_instance)

Sets the max_samples_per_instance value

Parameters
max_samples_per_instancethe max_samples_per_instance value

Definition at line 1024 of file CorePolicyImpl.hpp.

◆ max_samples_per_instance() [2/2]

int32_t dds::core::policy::DurabilityService::max_samples_per_instance ( ) const

Gets the max_samples_per_instance value

Returns
the max_samples_per_instance value

Definition at line 1031 of file CorePolicyImpl.hpp.

◆ operator!=()

template<typename D >
bool dds::core::Value< D >::operator!= ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if not equal

Definition at line 99 of file Value.hpp.

◆ operator->() [1/2]

template<typename D >
D * dds::core::Value< D >::operator-> ( )
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:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 111 of file Value.hpp.

◆ operator->() [2/2]

template<typename D >
const D * dds::core::Value< D >::operator-> ( ) const
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:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 105 of file Value.hpp.

◆ operator==()

template<typename D >
bool dds::core::Value< D >::operator== ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if equal

Definition at line 93 of file Value.hpp.

◆ service_cleanup_delay() [1/2]

DurabilityService & dds::core::policy::DurabilityService::service_cleanup_delay ( const dds::core::Duration service_cleanup_delay)

Sets the service_cleanup_delay value

Parameters
service_cleanup_delaythe service_cleanup_delay value

Definition at line 959 of file CorePolicyImpl.hpp.

◆ service_cleanup_delay() [2/2]

const dds::core::Duration dds::core::policy::DurabilityService::service_cleanup_delay ( ) const

Gets the service_cleanup_delay value

Returns
the service_cleanup_delay

Definition at line 966 of file CorePolicyImpl.hpp.


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