OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
org.opensplice.dds.topic.TopicImpl< TYPE > Class Template Reference
Inheritance diagram for org.opensplice.dds.topic.TopicImpl< TYPE >:
Inheritance graph
Collaboration diagram for org.opensplice.dds.topic.TopicImpl< TYPE >:
Collaboration graph

Public Member Functions

 TopicImpl (OsplServiceEnvironment environment, DomainParticipantImpl participant, String topicName, AbstractTypeSupport< TYPE > typeSupport, TopicQos qos, TopicListener< TYPE > listener, Collection< Class<? extends Status >> statuses)
 
 TopicImpl (OsplServiceEnvironment environment, DomainParticipantImpl participant, String topicName, DDS.Topic old)
 
void close ()
 Dispose the resources held by this object. More...
 
void close ()
 Dispose the resources held by this object. More...
 
final void close ()
 
abstract void close ()
 Halt communication and dispose the resources held by this Entity. More...
 
void disposeAllData ()
 
final void enable ()
 
void enable ()
 This operation enables the Entity. More...
 
AllDataDisposedStatus getAllDataDisposedTopicStatus ()
 
ServiceEnvironment getEnvironment ()
 
ServiceEnvironment getEnvironment ()
 
InconsistentTopicStatus getInconsistentTopicStatus ()
 This method allows the application to retrieve the org.omg.dds.core.status.InconsistentTopicStatus of the Topic. More...
 
final InstanceHandle getInstanceHandle ()
 
InstanceHandle getInstanceHandle ()
 
LISTENER getListener ()
 This operation allows access to the existing Listener attached to the Entity. More...
 
final LISTENER getListener ()
 
String getName ()
 Returns the name used to create the TopicDescription. More...
 
DDS.Topic getOld ()
 
OLD getOld ()
 
OLDPARENT getOldParent ()
 
DomainParticipant getParent ()
 
String getProperty (String key)
 Provides access to the current value for a given property. More...
 
TopicQos getQos ()
 
final Set< Class<? extends Status > > getStatusChanges ()
 
Set< Class<? extends Status > > getStatusChanges ()
 This operation retrieves the list of communication statuses in the Entity that are 'triggered. More...
 
StatusCondition< Topic< TYPE > > getStatusCondition ()
 
String getTypeName ()
 Returns the type name used to create the TopicDescription. More...
 
TypeSupport< TYPE > getTypeSupport ()
 Returns the org.omg.dds.type.TypeSupport used to create this TopicDescription. More...
 
void retain ()
 
final void retain ()
 
void retain ()
 Indicates that references to this object may go out of scope but that the application expects to look it up again later. More...
 
void setListener (LISTENER listener)
 This operation installs a Listener on the Entity. More...
 
void setListener (LISTENER listener, Collection< Class<? extends Status >> statuses)
 This operation installs a Listener on the Entity. More...
 
void setListener (LISTENER listener, Class<? extends Status >... statuses)
 This operation installs a Listener on the Entity. More...
 
void setListener (TopicListener< TYPE > listener)
 
void setListener (TopicListener< TYPE > listener, Collection< Class<? extends Status >> statuses)
 
void setListener (TopicListener< TYPE > listener, Class<? extends Status >... statuses)
 
void setProperty (String key, String value)
 This method sets the property specified by the key to the value given by the value. More...
 
void setQos (QOS qos)
 This operation is used to set the QoS policies of the Entity. More...
 
void setQos (TopicQos qos)
 

Static Public Member Functions

static boolean printReferences ()
 

Protected Member Functions

void destroy ()
 
void setOld (OLD old)
 

Protected Attributes

final transient OsplServiceEnvironment environment
 
LISTENERIMPL listener
 
PARENT parent
 

Detailed Description

Definition at line 47 of file TopicImpl.java.

Constructor & Destructor Documentation

◆ TopicImpl() [1/2]

org.opensplice.dds.topic.TopicImpl< TYPE >.TopicImpl ( OsplServiceEnvironment  environment,
DomainParticipantImpl  participant,
String  topicName,
AbstractTypeSupport< TYPE >  typeSupport,
TopicQos  qos,
TopicListener< TYPE >  listener,
Collection< Class<? extends Status >>  statuses 
)

Definition at line 53 of file TopicImpl.java.

◆ TopicImpl() [2/2]

org.opensplice.dds.topic.TopicImpl< TYPE >.TopicImpl ( OsplServiceEnvironment  environment,
DomainParticipantImpl  participant,
String  topicName,
DDS.Topic  old 
)

Definition at line 107 of file TopicImpl.java.

Member Function Documentation

◆ close() [1/4]

void org.opensplice.dds.topic.TopicDescriptionExt< TYPE >.close ( )
inherited

Dispose the resources held by this object.

A TopicDescription cannot be closed if it is in use by any org.omg.dds.pub.DataWriters or org.omg.dds.sub.DataReaders. With respect to org.omg.dds.topic.Topics specifically: a Topic cannot be closed if it has any remaining org.omg.dds.topic.ContentFilteredTopics or org.omg.dds.topic.MultiTopics related to it.

See also
org.omg.dds.core.Entity::close()

Implements org.omg.dds.topic.TopicDescription< TYPE >.

Implemented in org.opensplice.dds.topic.ContentFilteredTopicImpl< TYPE >.

◆ close() [2/4]

void org.omg.dds.topic.TopicDescription< TYPE >.close ( )
inherited

Dispose the resources held by this object.

A TopicDescription cannot be closed if it is in use by any org.omg.dds.pub.DataWriters or org.omg.dds.sub.DataReaders. With respect to org.omg.dds.topic.Topics specifically: a Topic cannot be closed if it has any remaining org.omg.dds.topic.ContentFilteredTopics or org.omg.dds.topic.MultiTopics related to it.

See also
org.omg.dds.core.Entity::close()

Implemented in org.opensplice.dds.topic.ContentFilteredTopicImpl< TYPE >, and org.opensplice.dds.topic.TopicDescriptionExt< TYPE >.

◆ close() [3/4]

final void org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.close ( )
inherited

Definition at line 139 of file EntityImpl.java.

◆ close() [4/4]

abstract void org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.close ( )
abstractinherited

Halt communication and dispose the resources held by this Entity.

Closing an Entity implicitly closes all of its contained objects, if any. For example, closing a Publisher also closes all of its contained DataWriters.

An Entity cannot be closed if it has any unclosed dependent objects, not including contained objects. These include the following:

The deletion of a org.omg.dds.pub.DataWriter will automatically unregister all instances. Depending on the settings of the org.omg.dds.core.policy.WriterDataLifecycle, the deletion of the DataWriter may also dispose all instances.

Exceptions
PreconditionNotMetExceptionif close is called on an Entity with unclosed dependent object(s), not including contained objects.
See also
org.omg.dds.topic.TopicDescription::close()

◆ destroy()

void org.opensplice.dds.topic.TopicImpl< TYPE >.destroy ( )
protected

Definition at line 261 of file TopicImpl.java.

◆ disposeAllData()

void org.opensplice.dds.topic.TopicImpl< TYPE >.disposeAllData ( )

Definition at line 314 of file TopicImpl.java.

◆ enable() [1/2]

final void org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.enable ( )
inherited

Definition at line 153 of file EntityImpl.java.

◆ enable() [2/2]

void org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.enable ( )
inherited

This operation enables the Entity.

Entity objects can be created either enabled or disabled. This is controlled by the value of the org.omg.dds.core.policy.EntityFactory on the corresponding factory for the Entity.

The default setting of org.omg.dds.core.policy.EntityFactory is such that, by default, it is not necessary to explicitly call enable on newly created entities.

The enable operation is idempotent. Calling enable on an already enabled Entity has no effect.

If an Entity has not yet been enabled, the following kinds of operations may be invoked on it:

  • Operations to set or get an Entity's QoS policies (including default QoS policies) and listener
  • getStatusCondition()
  • 'factory' operations and close()
  • getStatusChanges() and other get status operations (although the status of a disabled entity never changes)
  • 'lookup' operations

Other operations may explicitly state that they may be called on disabled entities; those that do not will fail with org.omg.dds.core.NotEnabledException.

It is legal to delete an Entity that has not been enabled by calling close(). Entities created from a factory that is disabled are created disabled regardless of the setting of org.omg.dds.core.policy.EntityFactory.

Calling enable on an Entity whose factory is not enabled will fail with org.omg.dds.core.PreconditionNotMetException.

If org.omg.dds.core.policy.EntityFactory#isAutoEnableCreatedEntities() is true, the enable operation on the factory will automatically enable all entities created from the factory.

The Listeners associated with an entity are not called until the entity is enabled. org.omg.dds.core.Conditions associated with an entity that is not enabled are "inactive," that is, have a triggerValue == false.

In addition to the general description, the enable operation on a org.omg.dds.sub.Subscriber has special meaning in specific usecases. This applies only to Subscribers with PresentationQoS coherent-access set to true with access-scope set to group.

In this case the subscriber is always created in a disabled state, regardless of the factory's auto-enable created entities setting. While the subscriber remains disabled, DataReaders can be created that will participate in coherent transactions of the subscriber.

See org.omg.dds.sub.Subscriber#beginAccess() and org.omg.dds.sub.Subscriber#endAccess() for more information.

All DataReaders will also be created in a disabled state. Coherency with group access-scope requires data to be delivered as a transaction, atomically, to all eligible readers. Therefore data should not be delivered to any single DataReader immediately after it's created, as usual, but only after the application has finished creating all DataReaders for a given Subscriber. At this point, the application should enable the Subscriber which in turn enables all its DataReaders.

Note that for a DataWriter which has a corresponding Publisher with a PresentationQoS with coherent-access set to true and access-scope set to topic or group that the HistoryQoS of the DataWriter should be set to KEEP_ALL otherwise the enable operation will fail. See org.omg.dds.pub.Publisher#createDataWriter(Topic, DataWriterQos, DataWriterListener, Collection)

◆ getAllDataDisposedTopicStatus()

AllDataDisposedStatus org.opensplice.dds.topic.TopicImpl< TYPE >.getAllDataDisposedTopicStatus ( )

Definition at line 321 of file TopicImpl.java.

◆ getEnvironment() [1/2]

ServiceEnvironment org.omg.dds.core.DDSObject.getEnvironment ( )
inherited
Returns
the org.omg.dds.core.ServiceEnvironment object that directly or indirectly was used to create this object.

Implemented in org.omg.dds.core.ServiceEnvironment, org.opensplice.dds.sub.ReflectionDataReader< TYPE, OUT_TYPE >, org.opensplice.dds.core.ModifiableTimeImpl, org.opensplice.dds.pub.ReflectionDataWriter< TYPE >, org.opensplice.dds.core.DurationImpl, org.opensplice.dds.topic.ContentFilteredTopicImpl< TYPE >, org.opensplice.dds.sub.ReadConditionImpl< TYPE >, org.opensplice.dds.core.EntityQosImpl< T extends QosPolicy >, org.opensplice.dds.type.TypeSupportImpl< TYPE >, org.opensplice.dds.topic.PublicationBuiltinTopicDataImpl, org.opensplice.dds.topic.SubscriptionBuiltinTopicDataImpl, org.opensplice.dds.topic.TopicBuiltinTopicDataImpl, org.opensplice.dds.domain.DomainParticipantFactoryImpl, org.opensplice.dds.core.QosProviderImpl, org.opensplice.dds.core.status.OfferedIncompatibleQosStatusImpl, org.opensplice.dds.core.status.RequestedIncompatibleQosStatusImpl, org.opensplice.dds.core.InstanceHandleImpl, org.opensplice.dds.core.StatusConditionImpl< T extends Entity<?, ?>, org.opensplice.dds.core.status.LivelinessChangedStatusImpl, org.opensplice.dds.core.status.PublicationMatchedStatusImpl, org.opensplice.dds.core.status.SubscriptionMatchedStatusImpl, org.opensplice.dds.sub.SampleImpl< TYPE >, org.opensplice.dds.core.policy.ShareImpl, org.opensplice.dds.core.status.OfferedDeadlineMissedStatusImpl, org.opensplice.dds.core.status.SampleRejectedStatusImpl, org.opensplice.dds.core.WaitSetImpl, org.opensplice.dds.topic.ParticipantBuiltinTopicDataImpl, org.opensplice.dds.core.status.RequestedDeadlineMissedStatusImpl, org.opensplice.dds.topic.BuiltinTopicKeyImpl, org.opensplice.dds.core.GuardConditionImpl, org.opensplice.dds.core.event.AllDataDisposedEventImpl< TYPE >, org.opensplice.dds.core.policy.QosPolicyCountImpl, org.opensplice.dds.core.status.InconsistentTopicStatusImpl, org.opensplice.dds.core.status.LivelinessLostStatusImpl, org.opensplice.dds.core.status.SampleLostStatusImpl, org.opensplice.dds.core.policy.QosPolicyImpl, org.opensplice.dds.core.status.AllDataDisposedStatusImpl, org.opensplice.dds.core.IllegalArgumentExceptionImpl, org.opensplice.dds.core.InconsistentPolicyExceptionImpl, org.opensplice.dds.core.policy.PolicyFactoryImpl, org.opensplice.dds.core.policy.TypeConsistencyEnforcementImpl, org.opensplice.dds.core.PreconditionNotMetExceptionImpl, org.opensplice.dds.core.AlreadyClosedExceptionImpl, org.opensplice.dds.core.IllegalOperationExceptionImpl, org.opensplice.dds.core.ImmutablePolicyExceptionImpl, org.opensplice.dds.core.NotEnabledExceptionImpl, org.opensplice.dds.core.OutOfResourcesExceptionImpl, org.opensplice.dds.core.DDSExceptionImpl, org.opensplice.dds.core.status.DataAvailableStatusImpl, and org.opensplice.dds.core.status.DataOnReadersStatusImpl.

◆ getEnvironment() [2/2]

ServiceEnvironment org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.getEnvironment ( )
inherited

Definition at line 121 of file EntityImpl.java.

◆ getInconsistentTopicStatus()

InconsistentTopicStatus org.opensplice.dds.topic.TopicImpl< TYPE >.getInconsistentTopicStatus ( )

This method allows the application to retrieve the org.omg.dds.core.status.InconsistentTopicStatus of the Topic.

Each org.omg.dds.core.DomainEntity has a set of relevant communication statuses. A change of status causes the corresponding Listener to be invoked and can also be monitored by means of the associated org.omg.dds.core.StatusCondition.

Returns
the InconsistentTopicStatus object
Exceptions
org.omg.dds.core.DDSExceptionAn internal error has occurred.
org.omg.dds.core.AlreadyClosedExceptionThe corresponding DataReader has been closed.
org.omg.dds.core.OutOfResourcesExceptionThe Data Distribution Service ran out of resources to complete this operation.
See also
TopicListener
StatusCondition

Implements org.omg.dds.topic.Topic< TYPE >.

Definition at line 240 of file TopicImpl.java.

◆ getInstanceHandle() [1/2]

final InstanceHandle org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.getInstanceHandle ( )
inherited

Definition at line 166 of file EntityImpl.java.

◆ getInstanceHandle() [2/2]

InstanceHandle org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.getInstanceHandle ( )
inherited
Returns
the org.omg.dds.core.InstanceHandle that represents the Entity.

◆ getListener() [1/2]

LISTENER org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.getListener ( )
inherited

This operation allows access to the existing Listener attached to the Entity.

Returns
The attached listener if set, or null otherwise.
See also
#setListener(EventListener)
#setListener(EventListener, Collection)

◆ getListener() [2/2]

final LISTENER org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.getListener ( )
inherited

Definition at line 174 of file EntityImpl.java.

◆ getName()

String org.opensplice.dds.topic.TopicImpl< TYPE >.getName ( )

Returns the name used to create the TopicDescription.

Returns
the name.

Implements org.omg.dds.topic.TopicDescription< TYPE >.

Definition at line 304 of file TopicImpl.java.

◆ getOld() [1/2]

◆ getOld() [2/2]

OLD org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.getOld ( )
inherited

Definition at line 102 of file EntityImpl.java.

◆ getOldParent()

OLDPARENT org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.getOldParent ( )
inherited

Definition at line 116 of file EntityImpl.java.

◆ getParent()

Returns
the factory object that created this entity.

Implements org.omg.dds.topic.Topic< TYPE >.

Definition at line 309 of file TopicImpl.java.

◆ getProperty()

String org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.getProperty ( String  key)
inherited

Provides access to the current value for a given property.

Parameters
keyThe key of the property to obtain the value for.
Returns
The value for the specified property, or null if it has not been set.

Definition at line 189 of file EntityImpl.java.

◆ getQos()

Definition at line 210 of file TopicImpl.java.

◆ getStatusChanges() [1/2]

final Set<Class<? extends Status> > org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.getStatusChanges ( )
inherited

Definition at line 160 of file EntityImpl.java.

◆ getStatusChanges() [2/2]

Set<Class<? extends Status> > org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.getStatusChanges ( )
inherited

This operation retrieves the list of communication statuses in the Entity that are 'triggered.

' That is, the list of statuses whose value has changed since the last time the application read the status.

When the entity is first created or if the entity is not enabled, all communication statuses are in the "untriggered" state so the list returned will be empty.

The list of statuses returned refers to the statuses that are triggered on the Entity itself and does not include statuses that apply to contained entities.

Returns
a new Set containing the triggered statuses.

◆ getStatusCondition()

StatusCondition<Topic<TYPE> > org.opensplice.dds.topic.TopicImpl< TYPE >.getStatusCondition ( )

Implements org.omg.dds.topic.Topic< TYPE >.

Definition at line 250 of file TopicImpl.java.

◆ getTypeName()

String org.opensplice.dds.topic.TopicImpl< TYPE >.getTypeName ( )

Returns the type name used to create the TopicDescription.

Returns
the type name

Implements org.omg.dds.topic.TopicDescription< TYPE >.

Definition at line 292 of file TopicImpl.java.

◆ getTypeSupport()

TypeSupport<TYPE> org.opensplice.dds.topic.TopicImpl< TYPE >.getTypeSupport ( )

Returns the org.omg.dds.type.TypeSupport used to create this TopicDescription.

Returns
the org.omg.dds.type.TypeSupport.

Implements org.omg.dds.topic.TopicDescription< TYPE >.

Definition at line 267 of file TopicImpl.java.

◆ printReferences()

static boolean org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.printReferences ( )
staticinherited

Definition at line 66 of file EntityImpl.java.

◆ retain() [1/3]

◆ retain() [2/3]

final void org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.retain ( )
inherited

Definition at line 126 of file EntityImpl.java.

◆ retain() [3/3]

void org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.retain ( )
inherited

Indicates that references to this object may go out of scope but that the application expects to look it up again later.

Therefore, the Service must consider this object to be still in use and may not close it automatically.

◆ setListener() [1/6]

void org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.setListener ( LISTENER  listener)
inherited

This operation installs a Listener on the Entity.

The listener will only be invoked on all communication statuses pertaining to the concrete type of this entity.

It is permitted to use null as the value of the listener. The null listener behaves as a Listener whose operations perform no action.

Only one listener can be attached to each Entity. If a listener was already set, the operation will replace it with the new one. Consequently if the value null is passed for the listener parameter, any existing listener will be removed.

Parameters
listenerthe listener to attach.
See also
getListener()
#setListener(EventListener, Collection)

◆ setListener() [2/6]

void org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.setListener ( LISTENER  listener,
Collection< Class<? extends Status >>  statuses 
)
inherited

This operation installs a Listener on the Entity.

The listener will only be invoked on the changes of communication status indicated by the specified mask.

It is permitted to use null as the value of the listener. The null listener behaves as a Listener whose operations perform no action.

Only one listener can be attached to each Entity. If a listener was already set, the operation will replace it with the new one. Consequently if the value null is passed for the listener parameter, any existing listener will be removed.

See also
getListener()
#setListener(EventListener)

◆ setListener() [3/6]

void org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.setListener ( LISTENER  listener,
Class<? extends Status >...  statuses 
)
inherited

This operation installs a Listener on the Entity.

The listener will only be invoked on the changes of communication status indicated by the specified mask.

It is permitted to use null as the value of the listener. The null listener behaves as a Listener whose operations perform no action.

Only one listener can be attached to each Entity. If a listener was already set, the operation will replace it with the new one. Consequently if the value null is passed for the listener parameter, any existing listener will be removed.

See also
getListener()
#setListener(EventListener)

◆ setListener() [4/6]

void org.opensplice.dds.topic.TopicImpl< TYPE >.setListener ( TopicListener< TYPE >  listener)

Definition at line 191 of file TopicImpl.java.

◆ setListener() [5/6]

void org.opensplice.dds.topic.TopicImpl< TYPE >.setListener ( TopicListener< TYPE >  listener,
Collection< Class<? extends Status >>  statuses 
)

Definition at line 196 of file TopicImpl.java.

◆ setListener() [6/6]

void org.opensplice.dds.topic.TopicImpl< TYPE >.setListener ( TopicListener< TYPE >  listener,
Class<? extends Status >...  statuses 
)

Definition at line 203 of file TopicImpl.java.

◆ setOld()

void org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.setOld ( OLD  old)
protectedinherited

Definition at line 112 of file EntityImpl.java.

◆ setProperty()

void org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.setProperty ( String  key,
String  value 
)
inherited

This method sets the property specified by the key to the value given by the value.

Currently, this method is only supported on a org.omg.dds.sub.DataReader and that supports the following properties:

parallelReadThreadCount - By default, the demarshalling of data into Java objects by a single read or take operation happens only in the calling thread. The parallelReadThreadCount property can be used to control the number of parallel threads to be used for this demarshalling. When reading multiple of samples takes a significant amount of time, increasing the number of threads on a multi-core machine can provide a significant benefit. The value is interpreted as the number of parallel threads to use (i.e., the value is a string representing a natural integer in decimal notation, so for example the string '4' will cause 4 threads to be used). The value '0' is allowed and selects the default behavior. If the call was successful, successive read/take operations on that org.omg.dds.sub.DataReader will use the specified number of threads for the demarshalling step of the respective operations until the value of this property is changed again.

CDRCopy - The default demarshalling technique constructs the Java object directly from the shared memory, but for some types, it is more efficient to marshal the value in shared memory into CDR representation, and then demarshal the CDR representation from Java. The value is interpreted as a boolean (i.e., value must be either 'true' or 'false'), with 'false' selecting the default technique and 'true' selecting the alternative, CDR-based technique. The CDR-based technique requires JacORB to be configured as the default ORB in the JVM, and furthermore requires that the JacORB IDL preprocessor has been used to generate a Helper class for the topic type of this org.omg.dds.sub.DataReader and that this helper class can be found in the class path. The ORB initialization and Helper class lookup is all done at run-time to avoid introducing a compile-time dependency, but this means that attempting to set the CDRCopy property to 'true' can fail in complicated ways because of these dependencies. When set to true, the CDR-based technique will be used for successive read/take operations on the data reader, until the property is set to false again.

Parameters
keyThe key of the property
valueThe value to assign to the property.

Definition at line 182 of file EntityImpl.java.

◆ setQos() [1/2]

void org.omg.dds.core.Entity< LISTENER extends EventListener, QOS extends EntityQos<?>.setQos ( QOS  qos)
inherited

This operation is used to set the QoS policies of the Entity.

This operation must be provided by each of the derived Entity classes (org.omg.dds.domain.DomainParticipant, org.omg.dds.topic.Topic, org.omg.dds.pub.Publisher, org.omg.dds.pub.DataWriter, org.omg.dds.sub.Subscriber, org.omg.dds.sub.DataReader) so that the policies that are meaningful to each Entity can be set.

The set of policies specified as the parameter are applied on top of the existing QoS, replacing the values of any policies previously set.

Certain policies are "immutable"; they can only be set at Entity creation time, or before the entity is made enabled. If setQos is invoked after the Entity is enabled and it attempts to change the value of an "immutable" policy, the operation will fail with org.omg.dds.core.ImmutablePolicyException.

Certain values of QoS policies can be incompatible with the settings of the other policies. The setQos operation will also fail if it specifies a set of values that once combined with the existing values would result in an inconsistent set of policies. In this case, it shall fail with org.omg.dds.core.InconsistentPolicyException.

If the application supplies a non-default value for a QoS policy that is not supported by the implementation of the service, the setQos operation will fail with UnsupportedOperationException.

The existing set of policies are only changed if the setQos operation succeeds. In all other cases, none of the policies is modified.

Exceptions
ImmutablePolicyExceptionif an immutable policy changes its value.
InconsistentPolicyExceptionif a combination of policies is inconsistent with one another.
UnsupportedOperationExceptionif an unsupported policy has a non-default value.
See also
getQos()

◆ setQos() [2/2]

void org.opensplice.dds.topic.TopicImpl< TYPE >.setQos ( TopicQos  qos)

Definition at line 220 of file TopicImpl.java.

Member Data Documentation

◆ environment

final transient OsplServiceEnvironment org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.environment
protectedinherited

Definition at line 36 of file EntityImpl.java.

◆ listener

LISTENERIMPL org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.listener
protectedinherited

Definition at line 39 of file EntityImpl.java.

◆ parent

PARENT org.opensplice.dds.core.DomainEntityImpl< OLD extends DDS.Entity, PARENT extends EntityImpl<?, ?, ?, ?, ?, OLDPARENT extends DDS.Entity, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.parent
protectedinherited

Definition at line 40 of file DomainEntityImpl.java.


The documentation for this class was generated from the following file: