RTI Connext C API  Version 6.1.0
DDS_WriterDataLifecycleQosPolicy Struct Reference

Controls how a DDS_DataWriter handles the lifecycle of the instances (keys) that it is registered to manage. More...

Data Fields

DDS_Boolean autodispose_unregistered_instances
 Boolean flag that controls the behavior when the DDS_DataWriter unregisters an instance by means of the unregister operations. More...
 
struct DDS_Duration_t autopurge_unregistered_instances_delay
 <<extension>> Maximum duration for which the DDS_DataWriter will maintain information regarding an instance once it has unregistered the instance. More...
 
struct DDS_Duration_t autopurge_disposed_instances_delay
 <<extension>> Maximum duration for which the DDS_DataWriter will maintain information regarding an instance once it has disposed the instance. More...
 

Detailed Description

Controls how a DDS_DataWriter handles the lifecycle of the instances (keys) that it is registered to manage.

Entity:
DDS_DataWriter
Properties:
RxO = N/A
Changeable = YES

Usage

This policy determines how the DDS_DataWriter acts with regards to the lifecycle of the data instances it manages (data instances that have been either explicitly registered with the DDS_DataWriter or implicitly registered by directly writing the data).

You may use FooDataWriter_unregister_instance to indicate that the DDS_DataWriter no longer wants to send data for a DDS_Topic.

The behavior controlled by this QoS policy applies on a per instance (key) basis for keyed Topics, so that when a DDS_DataWriter unregisters an instance, RTI Connext can automatically also dispose that instance. This is the default behavior.

In many cases where the ownership of a Topic is shared (see DDS_OwnershipQosPolicy), DataWriters may want to relinquish their ownership of a particular instance of the Topic to allow other DataWriters to send updates for the value of that instance regardless of Ownership Strength. In that case, you may only want a DataWriter to unregister an instance without disposing the instance. Disposing an instance is a statement that an instance no longer exists. User applications may be coded to trigger on the disposal of instances, thus the ability to unregister without disposing may be useful to properly maintain the semantic of disposal.

Field Documentation

◆ autodispose_unregistered_instances

DDS_Boolean DDS_WriterDataLifecycleQosPolicy::autodispose_unregistered_instances

Boolean flag that controls the behavior when the DDS_DataWriter unregisters an instance by means of the unregister operations.

  • DDS_BOOLEAN_TRUE
    The DDS_DataWriter will dispose of the instance each time it is unregistered. The behavior is identical to explicitly calling one of the dispose operations on the instance prior to calling the unregister operation.
  • DDS_BOOLEAN_FALSE (default)
    The DDS_DataWriter will not dispose of the instance. The application can still call one of the dispose operations prior to unregistering the instance and dispose of the instance that way.

[default] DDS_BOOLEAN_FALSE

◆ autopurge_unregistered_instances_delay

struct DDS_Duration_t DDS_WriterDataLifecycleQosPolicy::autopurge_unregistered_instances_delay

<<extension>> Maximum duration for which the DDS_DataWriter will maintain information regarding an instance once it has unregistered the instance.

Determines how long the DDS_DataWriter will maintain information regarding an instance that has been unregistered. By default, the DDS_DataWriter resources associated with an instance (e.g., the space needed to remember the Instance Key or KeyHash) are released lazily. This means the resources are only reclaimed when the space is needed for another instance because DDS_ResourceLimitsQosPolicy::max_instances is exceeded. This behavior can be changed by setting autopurge_unregistered_instances_delay to a value other than DDS_DURATION_INFINITE.

After this time elapses, the DDS_DataWriter will purge all internal information regarding the instance, including historical samples, even if DDS_ResourceLimitsQosPolicy::max_instances has not been reached.

The purging of unregistered instances can be done based on the source timestamp of the unregister sample or the time where the unregister sample was added to the DataWriter queue by setting the following property to 1 or 0 respectively (default: 0): dds.data_writer.history.source_timestamp_based_autopurge_instances_delay.

This QoS value is not supported with durable DDS_DataWriter history or data durability of DDS_VOLATILE_DURABILITY_QOS. With VOLATILE durability, instances are always removed as soon as all samples for the instance are fully acknowledged.

[default] DDS_DURATION_INFINITE (disabled) for all DDS_DataWriter except for the built-in discovery DataWriters DDS_DURATION_ZERO for built-in discovery DataWriters (see DDS_DiscoveryConfigQosPolicy::publication_writer_data_lifecycle and DDS_DiscoveryConfigQosPolicy::subscription_writer_data_lifecycle).

[range] [0, 1 year] or DDS_DURATION_INFINITE

◆ autopurge_disposed_instances_delay

struct DDS_Duration_t DDS_WriterDataLifecycleQosPolicy::autopurge_disposed_instances_delay

<<extension>> Maximum duration for which the DDS_DataWriter will maintain information regarding an instance once it has disposed the instance.

Determines how long the DDS_DataWriter will maintain information regarding an instance that has been disposed of. By default, disposing of an instance does not make it eligible to be purged. By setting autopurge_disposed_instances_delay to a value other than DDS_DURATION_INFINITE, the DataWriter will delete the resources associated with an instance (including historical samples) once the time has elapsed and all matching DataReaders have acknowledged all the samples for this instance including the dispose sample.

The purging of disposed instances can be done based on the source timestamp of the dispose sample or the time when the dispose sample was added to the DataWriter queue by setting the following property to 1 or 0 respectively (default: 0): dds.data_writer.history.source_timestamp_based_autopurge_instances_delay.

This QoS value is supported with durable DataWriter queues only for 0 and INFINITE values (finite values are not supported).

[default] DDS_DURATION_INFINITE (disabled)

[range] [0, 1 year] or DDS_DURATION_INFINITE