RTI Connext Java API  Version 5.1.0
WriterDataLifecycleQosPolicy Class Reference

Controls how a com.rti.dds.publication.DataWriter handles the lifecycle of the instances (keys) that it is registered to manage. More...

Inheritance diagram for WriterDataLifecycleQosPolicy:
QosPolicy

Public Attributes

boolean autodispose_unregistered_instances
 Boolean flag that controls the behavior when the com.rti.dds.publication.DataWriter unregisters an instance by means of the unregister operations.
 
final Duration_t autopurge_unregistered_instances_delay
 <<eXtension>> Maximum duration for which the com.rti.dds.publication.DataWriter will maintain information regarding an instance once it has unregistered the instance.
 
- Public Attributes inherited from QosPolicy
final QosPolicyId_t id
 The ID of this QoS policy.
 
final String policy_name
 The name of this QoS policy.
 

Additional Inherited Members

- Public Member Functions inherited from Struct
abstract boolean equals (Object obj)
 
abstract int hashCode ()
 
String toString ()
 
- Protected Member Functions inherited from Struct
 Struct ()
 
abstract void pull_from_nativeI (long native_status)
 
abstract void push_to_nativeI (long native_status)
 

Detailed Description

Controls how a com.rti.dds.publication.DataWriter handles the lifecycle of the instances (keys) that it is registered to manage.

Entity:
com.rti.dds.publication.DataWriter
Properties:
RxO = N/A
Changeable = YES

Usage

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

Since the deletion of a DataWriter automatically unregisters all data instances it manages, the setting of the autodispose_unregistered_instances flag will only determine whether instances are ultimately disposed when the com.rti.dds.publication.DataWriter is deleted either directly by means of the com.rti.dds.publication.Publisher.delete_datawriter operation or indirectly as a consequence of calling com.rti.dds.publication.Publisher.delete_contained_entities or com.rti.dds.domain.DomainParticipant.delete_contained_entities that contains the DataWriter.

You may use com.rti.ndds.example.FooDataWriter.unregister_instance to indicate that the com.rti.dds.publication.DataWriter no longer wants to send data for a com.rti.dds.topic.Topic.

The behavior controlled by this QoS policy applies on a per instance (key) basis for keyed Topics, so that when a com.rti.dds.publication.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 com.rti.dds.infrastructure.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.

Member Data Documentation

boolean autodispose_unregistered_instances

Boolean flag that controls the behavior when the com.rti.dds.publication.DataWriter unregisters an instance by means of the unregister operations.

  • com.rti.dds.infrastructure.true (default)
    The com.rti.dds.publication.DataWriter will dispose 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.
  • com.rti.dds.infrastructure.false

    The com.rti.dds.publication.DataWriter will not dispose the instance. The application can still call one of the dispose operations prior to unregistering the instance and accomplish the same effect.

[default] com.rti.dds.infrastructure.true

final Duration_t autopurge_unregistered_instances_delay

<<eXtension>> Maximum duration for which the com.rti.dds.publication.DataWriter will maintain information regarding an instance once it has unregistered the instance.

Determines how long the com.rti.dds.publication.DataWriter will maintain information regarding an instance that has been unregistered. By default, the com.rti.dds.publication.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 com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_instances is exceeded. This behavior can be changed by setting autopurge_unregistered_instance_delay to a value other than com.rti.dds.infrastructure.Duration_t.INFINITE.

After this time elapses, the com.rti.dds.publication.DataWriter will purge all internal information regarding the instance, including historical samples, even if com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_instances has not been reached.

[default] com.rti.dds.infrastructure.Duration_t.INFINITE (disabled)

[range] [0, 1 year] or com.rti.dds.infrastructure.Duration_t.INFINITE


RTI Connext Java API Version 5.1.0 Copyright © Mon Feb 3 2014 Real-Time Innovations, Inc