RTI Connext Java API  Version 5.0.0
PartitionQosPolicy Class Reference

Set of strings that introduces a logical partition among the topics visible by a com.rti.dds.publication.Publisher and a com.rti.dds.subscription.Subscriber. More...

Inheritance diagram for PartitionQosPolicy:
QosPolicy

Public Attributes

final StringSeq name
 A list of partition names.
 
- 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

Set of strings that introduces a logical partition among the topics visible by a com.rti.dds.publication.Publisher and a com.rti.dds.subscription.Subscriber.

This QoS policy is used to set string identifiers that are used for matching DataReaders and DataWriters for the same Topic.

A com.rti.dds.publication.DataWriter within a com.rti.dds.publication.Publisher only communicates with a com.rti.dds.subscription.DataReader in a com.rti.dds.subscription.Subscriber if (in addition to matching the com.rti.dds.topic.Topic and having compatible QoS) the com.rti.dds.publication.Publisher and com.rti.dds.subscription.Subscriber have a common partition name string.

Entity:
com.rti.dds.publication.Publisher, com.rti.dds.subscription.Subscriber
Properties:
RxO = NO
Changeable = YES

Usage

This policy allows the introduction of a logical partition concept inside the 'physical' partition induced by a domain.

Usually DataReaders and DataWriters are matched only by their topic (so that data are only sent by DataWriters to DataReaders for the same topic). The Partition QoS policy allows you to add one or more strings, "partitions", to a Publisher and/or Subscriber. If partitions are added, then a DataWriter and DataReader for the same topic are only considered matched if their Publishers and Subscribers have partitions in common (intersecting partitions).

Since the set of partitions for a publisher or subscriber can be dynamically changed, the Partition QoS policy is useful to control which DataWriters can send data to which DataReaders and vice versa – even if all of the DataWriters and DataReaders are for the same topic. This facility is useful for creating temporary separation groups among entities that would otherwise be connected to and exchange data each other.

Failure to match partitions is not considered an incompatible QoS and does not trigger any listeners or conditions. A change in this policy can potentially modify the "match" of existing DataReader and DataWriter entities. It may establish new "matches" that did not exist before, or break existing matches.

Partition strings are usually directly matched via string comparisons. However, partition strings can also contain wildcard symbols so that partitions can be matched via pattern matching. As long as the partitions or wildcard patterns of a Publisher intersect with the partitions or wildcard patterns of a Subscriber, their DataWriters and DataReaders of the same topic are able to match; otherwise they are not.

These partition name patterns are regular expressions as defined by the POSIX fnmatch API (1003.2-1992 section B.6). Either com.rti.dds.publication.Publisher or com.rti.dds.subscription.Subscriber may include regular expressions in partition names, but no two names that both contain wildcards will ever be considered to match. This means that although regular expressions may be used both at publisher as well as subscriber side, RTI Connext will not try to match two regular expressions (between publishers and subscribers).

Each publisher and subscriber must belong to at least one logical partition. A regular expression is not considered to be a logical partition. If a publisher or subscriber has not specify a logical partition, it is assumed to be in the default partition. The default partition is defined to be an empty string (""). Put another way:

  • An empty sequence of strings in this QoS policy is considered equivalent to a sequence containing only a single string, the empty string.
  • A string sequence that contains only regular expressions and no literal strings, it is treated as if it had an additional element, the empty string.

Partitions are different from creating com.rti.dds.infrastructure.Entity objects in different domains in several ways.

  • First, entities belonging to different domains are completely isolated from each other; there is no traffic, meta-traffic or any other way for an application or RTI Connext itself to see entities in a domain it does not belong to.
  • Second, a com.rti.dds.infrastructure.Entity can only belong to one domain whereas a com.rti.dds.infrastructure.Entity can be in multiple partitions.
  • Finally, as far as RTI Connext is concerned, each unique data instance is identified by the tuple (DomainID, com.rti.dds.topic.Topic, key). Therefore two com.rti.dds.infrastructure.Entity objects in different domains cannot refer to the same data instance. On the other hand, the same data instance can be made available (published) or requested (subscribed) on one or more partitions.

Member Data Documentation

final StringSeq name

A list of partition names.

Several restrictions apply to the partition names in this sequence. A violation of one of the following rules will result in a com.rti.dds.infrastructure.RETCODE_INCONSISTENT_POLICY when setting a com.rti.dds.publication.Publisher's or com.rti.dds.subscription.Subscriber's QoS.

  • A partition name string cannot be NULL, nor can it contain the reserved comma character (',').

[default] Empty sequence (zero-length sequence). Since no logical partition is specified, RTI Connext will assume the entity to be in default partition (empty string partition "").

[range] List of partition name with above restrictions


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