RTI Connext Java API  Version 5.1.0
DataWriterResourceLimitsInstanceReplacementKind Class Reference

Sets the kinds of instances that can be replaced when instance resource limits are reached. More...

Inheritance diagram for DataWriterResourceLimitsInstanceReplacementKind:
Enum Copyable

Static Public Attributes

static final
DataWriterResourceLimitsInstanceReplacementKind 
UNREGISTERED_INSTANCE_REPLACEMENT
 Allows a com.rti.dds.publication.DataWriter to reclaim unregistered acknowledged instances.
 
static final
DataWriterResourceLimitsInstanceReplacementKind 
ALIVE_INSTANCE_REPLACEMENT
 Allows a com.rti.dds.publication.DataWriter to reclaim alive acknowledged instances.
 
static final
DataWriterResourceLimitsInstanceReplacementKind 
DISPOSED_INSTANCE_REPLACEMENT
 Allows a com.rti.dds.publication.DataWriter to reclaim disposed acknowledged instances.
 
static final
DataWriterResourceLimitsInstanceReplacementKind 
ALIVE_THEN_DISPOSED_INSTANCE_REPLACEMENT
 Allows a com.rti.dds.publication.DataWriter first to reclaim an alive acknowledged instance, and then if necessary a disposed acknowledged instance.
 
static final
DataWriterResourceLimitsInstanceReplacementKind 
DISPOSED_THEN_ALIVE_INSTANCE_REPLACEMENT
 Allows a com.rti.dds.publication.DataWriter first to reclaim a disposed acknowledged instance, and then if necessary an alive acknowledged instance.
 
static final
DataWriterResourceLimitsInstanceReplacementKind 
ALIVE_OR_DISPOSED_INSTANCE_REPLACEMENT
 Allows a com.rti.dds.publication.DataWriter to reclaim a either an alive acknowledged instance or a disposed acknowledged instance.
 

Additional Inherited Members

- Public Member Functions inherited from Enum
final int ordinal ()
 The integral value of this enumerated constant.
 
Object copy_from (Object src)
 
final String name ()
 The name of this enum constant, as declared in the enum declaration.
 
final String toString ()
 The string value of this enum constant.
 
- Protected Member Functions inherited from Enum
 Enum (String name, int ordinal)
 The constructor.
 

Detailed Description

Sets the kinds of instances that can be replaced when instance resource limits are reached.

When com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_instances is reached, a com.rti.dds.publication.DataWriter will try to make room for a new instance by attempting to reclaim an existing instance based on the instance replacement kind specified by com.rti.dds.infrastructure.DataWriterResourceLimitsQosPolicy.instance_replacement.

Only instances whose states match the specified kinds are eligible to be replaced. In addition, an instance must have had all of its samples fully acknowledged for it to be considered replaceable.

For all kinds, a com.rti.dds.publication.DataWriter will replace the oldest instance satisfying that kind. For example, when the kind is com.rti.dds.infrastructure.DataWriterResourceLimitsInstanceReplacementKind.DataWriterResourceLimitsInstanceReplacementKind.UNREGISTERED_INSTANCE_REPLACEMENT, a com.rti.dds.publication.DataWriter will remove the oldest fully acknowledged unregistered instance, if such an instance exists.

If no replaceable instance exists, the invoked function will either return with an appropriate out-of-resources return code, or in the case of a write, it may first block to wait for an instance to be acknowledged. Otherwise, the com.rti.dds.publication.DataWriter will replace the old instance with the new instance, and invoke, if available, the com.rti.dds.publication.DataWriterListener_InstanceReplacedCallback to notify the user about an instance being replaced.

A com.rti.dds.publication.DataWriter checks for replaceable instances in the following order, stopping once a replaceable instance is found:

If com.rti.dds.infrastructure.DataWriterResourceLimitsQosPolicy.replace_empty_instances is com.rti.dds.infrastructure.true, a com.rti.dds.publication.DataWriter first tries replacing instances that have no samples. These empty instances can be unregistered, disposed, or alive. Next, a com.rti.dds.publication.DataWriter tries replacing unregistered instances. Since an unregistered instance indicates that the com.rti.dds.publication.DataWriter is done modifying it, unregistered instances are replaced before instances of any other state (alive, disposed). This is the same as the com.rti.dds.infrastructure.DataWriterResourceLimitsInstanceReplacementKind.DataWriterResourceLimitsInstanceReplacementKind.UNREGISTERED_INSTANCE_REPLACEMENT kind. Then, a com.rti.dds.publication.DataWriter tries replacing what is specified by com.rti.dds.infrastructure.DataWriterResourceLimitsQosPolicy.instance_replacement. With unregistered instances already checked, this leaves alive and disposed instances. When both alive and disposed instances may be replaced, the kind specifies whether the particular order matters (e.g. DISPOSED_THEN_ALIVE, ALIVE_THEN_DISPOSED) or not (ALIVE_OR_DISPOSED).

QoS:
com.rti.dds.infrastructure.DataWriterResourceLimitsQosPolicy

Member Data Documentation

final DataWriterResourceLimitsInstanceReplacementKind UNREGISTERED_INSTANCE_REPLACEMENT
static

Allows a com.rti.dds.publication.DataWriter to reclaim unregistered acknowledged instances.

By default all instance replacement kinds first attempt to reclaim an unregistered acknowledged instance. Used in com.rti.dds.infrastructure.DataWriterResourceLimitsQosPolicy.instance_replacement [default]

final DataWriterResourceLimitsInstanceReplacementKind ALIVE_INSTANCE_REPLACEMENT
static

Allows a com.rti.dds.publication.DataWriter to reclaim alive acknowledged instances.

When an unregistered acknowledged instance is not available to reclaim, this kind allows a com.rti.dds.publication.DataWriter to reclaim an alive acknowledged instance, where an alive instance is a registered, non-disposed instance. The least recently registered or written alive instance will be reclaimed.

final DataWriterResourceLimitsInstanceReplacementKind DISPOSED_INSTANCE_REPLACEMENT
static

Allows a com.rti.dds.publication.DataWriter to reclaim disposed acknowledged instances.

When an unregistered acknowledged instance is not available to reclaim, this kind allows a com.rti.dds.publication.DataWriter to reclaim a disposed acknowledged instance. The least recently disposed instance will be reclaimed.

final DataWriterResourceLimitsInstanceReplacementKind ALIVE_THEN_DISPOSED_INSTANCE_REPLACEMENT
static

Allows a com.rti.dds.publication.DataWriter first to reclaim an alive acknowledged instance, and then if necessary a disposed acknowledged instance.

When an unregistered acknowledged instance is not available to reclaim, this kind allows a com.rti.dds.publication.DataWriter first try reclaiming an alive acknowledged instance. If no instance is reclaimable, then it trys reclaiming a disposed acknowledged instance. The least recently used (i.e. registered, written, or disposed) instance will be reclaimed.

final DataWriterResourceLimitsInstanceReplacementKind DISPOSED_THEN_ALIVE_INSTANCE_REPLACEMENT
static

Allows a com.rti.dds.publication.DataWriter first to reclaim a disposed acknowledged instance, and then if necessary an alive acknowledged instance.

When an unregistered acknowledged instance is not available to reclaim, this kind allows a com.rti.dds.publication.DataWriter first try reclaiming a disposed acknowledged instance. If no instance is reclaimable, then it trys reclaiming an alive acknowledged instance. The least recently used (i.e. disposed, registered, or written) instance will be reclaimed.

final DataWriterResourceLimitsInstanceReplacementKind ALIVE_OR_DISPOSED_INSTANCE_REPLACEMENT
static

Allows a com.rti.dds.publication.DataWriter to reclaim a either an alive acknowledged instance or a disposed acknowledged instance.

When an unregistered acknowledged instance is not available to reclaim, this kind allows a com.rti.dds.publication.DataWriter to reclaim either an alive acknowledged instance or a disposed acknowledged instance. If both instance kinds are available to reclaim, the com.rti.dds.publication.DataWriter will reclaim the least recently used (i.e. disposed, registered, or written) instance.


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