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

More...

#include "CorePolicy.hpp"

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

Public Member Functions

 WriterDataLifecycle (bool autodispose_unregistered_instances=true)
 
 WriterDataLifecycle (const WriterDataLifecycle &other)
 
bool autodispose_unregistered_instances () const
 
WriterDataLifecycleautodispose_unregistered_instances (bool autodispose_unregistered_instances)
 
void autopurge_suspended_samples_delay (const dds::core::Duration &d)
 
const dds::core::Duration autopurge_suspended_samples_delay () const
 
void autounregister_instance_delay (const dds::core::Duration &d)
 
const dds::core::Duration autounregister_instance_delay () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 

Static Public Member Functions

static WriterDataLifecycle AutoDisposeUnregisteredInstances ()
 
static WriterDataLifecycle ManuallyDisposeUnregisteredInstances ()
 

Detailed Description

This QosPolicy drives the behaviour of a DataWriter concerning the life-cycle of the instances and samples that have been written by it.

Attributes

Value Meaning Concerns RxO Changeable
A boolean:
autodispose_unregistered_instances
Specifies the behavior of the DataWriter with regards to the lifecycle of the data-instances it manages. Controls whether a DataWriter will automatically dispose instances each time they are unregistered. The setting autodispose_unregistered_instances = TRUE indicates that unregistered instances will also be considered disposed. By default, TRUE. DataWriter N/A Yes
A duration:
autopurge_suspended_samples_delay
Specifies the duration after which the DataWriter will automatically remove a sample from its history during periods in which its Publisher is suspended. This duration is calculated based on the source timestamp of the written sample. By default the duration value is set to DURATION_INFINITE and therefore no automatic purging of samples occurs.
A duration:
autounregister_instance_delay
Specifies the duration after which the DataWriter will automatically unregister an instance after the application wrote a sample for it and no further action is performed on the same instance by this DataWriter afterwards. This means that when the application writes a new sample for this instance, the duration is recalculated from that action onwards. By default the duration value is DURATION_INFINITE and therefore no automatic unregistration occurs.

This QosPolicy controls the behaviour of the DataWriter with regards to the lifecycle of the data-instances it manages; that is, those data-instances that have been registered, either explicitly using one of the register operations, or implicitly by directly writing the data using the special HANDLE_NIL parameter. The autodispose_unregistered_instances flag controls what happens when an instance gets unregistered by the DataWriter:

  • If the DataWriter unregisters the instance explicitly using either unregister_instance or unregister_instance_w_timestamp, then the autodispose_unregistered_instances flag is currently ignored and the instance is never disposed automatically.
  • If the DataWriter unregisters its instances implicitly because it is deleted, or if a DataReader detects a loss of liveliness of a connected DataWriter, or if autounregister_instance_delay expires, then the autodispose_unregistered_instances flag determines whether the concerned instances are automatically disposed (TRUE) or not (FALSE).

The default value for the autodispose_unregistered_instances flag is TRUE. For TRANSIENT and PERSISTENT Topics this means that all instances that are not explicitly unregistered by the application will by default be removed from the Transient and Persistent stores when the DataWriter is deleted or when a loss of its liveliness is detected. For DataWriters associated with TRANSIENT and PERSISTENT Topics setting the autodispose_unregister_instances attribute to TRUE would mean that all instances that are not explicitly unregistered by the application will by default be removed from the Transient and Persistent stores when the DataWriter is deleted, when a loss of liveliness is detected, or when the autounregister_instance_delay expires.

Definition at line 678 of file CorePolicy.hpp.

Constructor & Destructor Documentation

◆ WriterDataLifecycle() [1/2]

dds::core::policy::WriterDataLifecycle::WriterDataLifecycle ( bool  autodispose_unregistered_instances = true)
explicit

Creates a WriterDataLifecycle QoS instance

Parameters
autodispose_unregistered_instancesSpecifies the behavior of the DataWriter with regards to the lifecycle of the data-instances it manages.

Definition at line 519 of file CorePolicyImpl.hpp.

◆ WriterDataLifecycle() [2/2]

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

Copies a WriterDataLifecycle QoS instance

Parameters
otherthe WriterDataLifecycle QoS instance to copy

Definition at line 522 of file CorePolicyImpl.hpp.

Member Function Documentation

◆ autodispose_unregistered_instances() [1/2]

bool dds::core::policy::WriterDataLifecycle::autodispose_unregistered_instances ( ) const

Gets a boolean indicating if unregistered instances should be autodisposed

Returns
a boolean indicating if unregistered instances should be autodisposed

Definition at line 525 of file CorePolicyImpl.hpp.

◆ autodispose_unregistered_instances() [2/2]

WriterDataLifecycle & dds::core::policy::WriterDataLifecycle::autodispose_unregistered_instances ( bool  autodispose_unregistered_instances)

Sets a boolean indicating if unregistered instances should be autodisposed

Parameters
autodispose_unregistered_instancesa boolean indicating if unregistered instances should be autodisposed

Definition at line 531 of file CorePolicyImpl.hpp.

◆ AutoDisposeUnregisteredInstances()

WriterDataLifecycle dds::core::policy::WriterDataLifecycle::AutoDisposeUnregisteredInstances ( )
static
Returns
a WriterDataLifecycle QoS instance with autodispose_unregistered_instances set to true

Definition at line 538 of file CorePolicyImpl.hpp.

◆ autopurge_suspended_samples_delay() [1/2]

void dds::core::policy::WriterDataLifecycle::autopurge_suspended_samples_delay ( const dds::core::Duration d)

Sets the autopurge_suspended_samples_delay

Note
This is a proprietary OpenSplice extension.

Call
This is a proprietary operation and can be called by using the operator->.

Parameters
dSpecifies the duration after which the DataWriter will automatically remove a sample from its history during periods in which its Publisher is suspended. This duration is calculated based on the source timestamp of the written sample. By default the duration value is set to DURATION_INFINITE and therefore no automatic purging of samples occurs. See dds::pub::SuspendedPublication for more information about suspended publication.

◆ autopurge_suspended_samples_delay() [2/2]

const dds::core::Duration dds::core::policy::WriterDataLifecycle::autopurge_suspended_samples_delay ( ) const

Gets the autopurge_suspended_samples_delay

Note
This is a proprietary OpenSplice extension.

Call
This is a proprietary operation and can be called by using the operator->.

Returns
the suspension delay after which samples will be autopurged

◆ autounregister_instance_delay() [1/2]

void dds::core::policy::WriterDataLifecycle::autounregister_instance_delay ( const dds::core::Duration d)

Sets the autounregister_instance_delay

Note
This is a proprietary OpenSplice extension.

Call
This is a proprietary operation and can be called by using the operator->.

Parameters
dSpecifies the duration after which the DataWriter will automatically unregister an instance after the application wrote a sample for it and no further action is performed on the same instance by this DataWriter afterwards. This means that when the application writes a new sample for this instance, the duration is recalculated from that action onwards. By default the duration value is DURATION_INFINITE and therefore no automatic unregistration occurs.

◆ autounregister_instance_delay() [2/2]

const dds::core::Duration dds::core::policy::WriterDataLifecycle::autounregister_instance_delay ( ) const

Gets the autounregister_instance_delay

Note
This is a proprietary OpenSplice extension.

Call
This is a proprietary operation and can be called by using the operator->.

Returns
the delay after which samples will be autounregistered

◆ ManuallyDisposeUnregisteredInstances()

WriterDataLifecycle dds::core::policy::WriterDataLifecycle::ManuallyDisposeUnregisteredInstances ( )
static
Returns
a WriterDataLifecycle QoS instance with autodispose_unregistered_instances set to false

Definition at line 544 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.


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