RTI Connext Java API  Version 5.0.0
BatchQosPolicy Class Reference

Used to configure batching of multiple samples into a single network packet in order to increase throughput for small samples. More...

Inheritance diagram for BatchQosPolicy:
QosPolicy

Public Attributes

boolean enable
 Specifies whether or not batching is enabled.
 
int max_data_bytes
 The maximum cumulative length of all serialized samples in a batch.
 
int max_samples
 The maximum number of samples in a batch.
 
final Duration_t max_flush_delay
 The maximum flush delay.
 
final Duration_t source_timestamp_resolution
 Batch source timestamp resolution.
 
boolean thread_safe_write
 Determines whether or not the write operation is thread safe.
 
- 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

Used to configure batching of multiple samples into a single network packet in order to increase throughput for small samples.

This QoS policy configures the ability of the middleware to collect multiple user data samples to be sent in a single network packet, to take advantage of the efficiency of sending larger packets and thus increase effective throughput.

This QoS policy can be used to dramatically increase effective throughput for small data samples. Usually, throughput for small samples (size < 2048 bytes) is limited by CPU capacity and not by network bandwidth. Batching many smaller samples to be sent in a single large packet will increase network utilization, and thus throughput, in terms of samples per second.

Entity:
com.rti.dds.publication.DataWriter
Properties:
RxO = NO
Changeable = UNTIL ENABLE

Member Data Documentation

boolean enable

Specifies whether or not batching is enabled.

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

int max_data_bytes

The maximum cumulative length of all serialized samples in a batch.

A batch is flushed automatically when this maximum is reached.

max_data_bytes does not include the meta data associated with the batch samples. Each sample has at least 8 bytes of meta data containing information such as the timestamp and sequence number. The meta data can be as large as 52 bytes for keyed topics and 20 bytes for unkeyed topics.

Note: Batches must contain whole samples. If a new batch is started and its initial sample causes the serialized size to exceed max_data_bytes, RTI Connext will send the sample in a single batch.

[default] 1024

[range] [1,com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED]

Consistency

The setting of com.rti.dds.infrastructure.BatchQosPolicy.max_data_bytes must be consistent with com.rti.dds.infrastructure.BatchQosPolicy.max_samples. For these two values to be consistent, they cannot be both com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED.

int max_samples

The maximum number of samples in a batch.

A batch is flushed automatically when this maximum is reached.

[default] com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED

[range] [1,com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED]

Consistency

The setting of com.rti.dds.infrastructure.BatchQosPolicy.max_samples must be consistent with com.rti.dds.infrastructure.BatchQosPolicy.max_data_bytes. For these two values to be consistent, they cannot be both com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED.

final Duration_t max_flush_delay

The maximum flush delay.

A batch is flushed automatically after the delay specified by this parameter.

The delay is measured from the time the first sample in the batch is written by the application.

[default] com.rti.dds.infrastructure.Duration_t.INFINITE

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

Consistency

The setting of com.rti.dds.infrastructure.BatchQosPolicy.max_flush_delay must be consistent with com.rti.dds.infrastructure.AsynchronousPublisherQosPolicy.disable_asynchronous_batch and com.rti.dds.infrastructure.BatchQosPolicy.thread_safe_write. If the delay is different than com.rti.dds.infrastructure.Duration_t.INFINITE, com.rti.dds.infrastructure.AsynchronousPublisherQosPolicy.disable_asynchronous_batch must be set to com.rti.dds.infrastructure.false and com.rti.dds.infrastructure.BatchQosPolicy.thread_safe_write must be set to com.rti.dds.infrastructure.true.

final Duration_t source_timestamp_resolution

Batch source timestamp resolution.

The value of this field determines how the source timestamp is associated with the samples in a batch.

A sample written with timestamp 't' inherits the source timestamp 't2' associated with the previous sample unless ('t' - 't2') > source_timestamp_resolution.

If source_timestamp_resolution is set to com.rti.dds.infrastructure.Duration_t.INFINITE, every sample in the batch will share the source timestamp associated with the first sample.

If source_timestamp_resolution is set to zero, every sample in the batch will contain its own source timestamp corresponding to the moment when the sample was written.

The performance of the batching process is better when source_timestamp_resolution is set to com.rti.dds.infrastructure.Duration_t.INFINITE.

[default] com.rti.dds.infrastructure.Duration_t.INFINITE

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

Consistency

The setting of com.rti.dds.infrastructure.BatchQosPolicy.source_timestamp_resolution must be consistent with com.rti.dds.infrastructure.BatchQosPolicy.thread_safe_write. If com.rti.dds.infrastructure.BatchQosPolicy.thread_safe_write is set to com.rti.dds.infrastructure.false, com.rti.dds.infrastructure.BatchQosPolicy.source_timestamp_resolution must be set to com.rti.dds.infrastructure.Duration_t.INFINITE.

boolean thread_safe_write

Determines whether or not the write operation is thread safe.

If this parameter is set to com.rti.dds.infrastructure.true, multiple threads can call write on the com.rti.dds.publication.DataWriter concurrently.

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

Consistency

The setting of com.rti.dds.infrastructure.BatchQosPolicy.thread_safe_write must be consistent with com.rti.dds.infrastructure.BatchQosPolicy.source_timestamp_resolution. If com.rti.dds.infrastructure.BatchQosPolicy.thread_safe_write is set to com.rti.dds.infrastructure.false, com.rti.dds.infrastructure.BatchQosPolicy.source_timestamp_resolution must be set to com.rti.dds.infrastructure.Duration_t.INFINITE.


RTI Connext Java API Version 5.0.0 Copyright © Thu Aug 30 2012 Real-Time Innovations, Inc