![]() |
OpenSplice Java 5 DCPS
v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
This type is implemented by all OpenSplice org.omg.dds.core.Entity classes to allow setting and getting of OpenSplice-specific properties on them. More...
Public Member Functions | |
String | getProperty (String key) |
Provides access to the current value for a given property. More... | |
void | setProperty (String key, String value) |
This method sets the property specified by the key to the value given by the value. More... | |
This type is implemented by all OpenSplice org.omg.dds.core.Entity classes to allow setting and getting of OpenSplice-specific properties on them.
See setProperty(String, String) for all properties that are currently supported.
Definition at line 31 of file Properties.java.
String org.opensplice.dds.core.Properties.getProperty | ( | String | key | ) |
Provides access to the current value for a given property.
key | The key of the property to obtain the value for. |
Implemented in org.opensplice.dds.domain.DomainParticipantImpl, and org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.
void org.opensplice.dds.core.Properties.setProperty | ( | String | key, |
String | value | ||
) |
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.
key | The key of the property |
value | The value to assign to the property. |
Implemented in org.opensplice.dds.domain.DomainParticipantImpl, and org.opensplice.dds.core.EntityImpl< OLD extends DDS.Entity, OLDPARENT, QOS extends EntityQos<?, LISTENER extends EventListener, LISTENERIMPL extends Listener< LISTENER >.