OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE > Class Template Reference
Inheritance diagram for org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >:
Inheritance graph
Collaboration diagram for org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >:
Collaboration graph

Public Member Functions

 DataReaderProtobuf (OsplServiceEnvironment environment, SubscriberImpl parent, TopicDescriptionExt< PROTOBUF_TYPE > topicDescription, DataReaderQos qos, DataReaderListener< PROTOBUF_TYPE > listener, Collection< Class<? extends Status >> statuses)
 
void closeContainedEntities ()
 This operation closes all the entities that were created by means of the "create" operations on the DataReader. More...
 
Iterator< PROTOBUF_TYPE > createIterator (Object sampleSeqHolder, Field sampleSeqHolderValueField, SampleInfoSeqHolder info)
 
abstract Sample.Iterator<?> createIterator (Object sampleSeqHolder, Field sampleSeqHolderValueField, DDS.SampleInfoSeqHolder info)
 
QueryCondition< TYPE > createQueryCondition (String queryExpression, List< String > queryParameters)
 This operation creates a QueryCondition. More...
 
QueryCondition< TYPE > createQueryCondition (DataState states, String queryExpression, List< String > queryParameters)
 This operation creates a QueryCondition. More...
 
QueryCondition< TYPE > createQueryCondition (String queryExpression, String... queryParameters)
 This operation creates a QueryCondition. More...
 
QueryCondition< TYPE > createQueryCondition (DataState states, String queryExpression, String... queryParameters)
 This operation creates a QueryCondition. More...
 
ReadCondition< TYPE > createReadCondition (DataState states)
 This operation creates a ReadCondition. More...
 
void deregisterIterator (AbstractIterator< TYPE > iterator)
 
void destroyReadCondition (ReadConditionImpl< TYPE > condition)
 
PROTOBUF_TYPE getKeyValue (PROTOBUF_TYPE keyHolder, InstanceHandle handle)
 
PROTOBUF_TYPE getKeyValue (InstanceHandle handle)
 
LivelinessChangedStatus getLivelinessChangedStatus ()
 This operation obtains the LivelinessChangedStatus object of the DataReader. More...
 
PublicationBuiltinTopicData getMatchedPublicationData (InstanceHandle publicationHandle)
 This operation retrieves information on a publication that is currently "associated" with the DataReader; that is, a publication with a matching org.omg.dds.topic.Topic and compatible QoS that the application has not indicated should be "ignored" by means of org.omg.dds.domain.DomainParticipant#ignorePublication(InstanceHandle). More...
 
Set< InstanceHandlegetMatchedPublications ()
 This operation retrieves the list of publications currently "associated" with the DataReader; that is, publications that have a matching org.omg.dds.topic.Topic and compatible QoS that the application has not indicated should be "ignored" by means of org.omg.dds.domain.DomainParticipant#ignorePublication(InstanceHandle). More...
 
SubscriberImpl getParent ()
 
PreAllocator< PROTOBUF_TYPE > getPreAllocator (List< Sample< PROTOBUF_TYPE >> samples, Class<?> sampleSeqHolderClz, Field sampleSeqHolderValueField)
 
abstract PreAllocator< TYPE > getPreAllocator (List< Sample< TYPE >> samples, Class<?> sampleSeqHolderClz, Field sampleSeqHolderValueField)
 
String getProperty (String key)
 
DataReaderQos getQos ()
 
RequestedDeadlineMissedStatus getRequestedDeadlineMissedStatus ()
 This operation obtains the RequestedDeadlineMissedStatus object of the DataReader. More...
 
RequestedIncompatibleQosStatus getRequestedIncompatibleQosStatus ()
 This operation obtains the RequestedIncompatibleQosStatus object of the DataReader. More...
 
SampleLostStatus getSampleLostStatus ()
 This operation obtains the SampleLostStatus object of the DataReader. More...
 
SampleRejectedStatus getSampleRejectedStatus ()
 This operation obtains the SampleRejectedStatus object of the DataReader. More...
 
StatusCondition< DataReader< TYPE > > getStatusCondition ()
 
SubscriptionMatchedStatus getSubscriptionMatchedStatus ()
 This operation obtains the SubscriptionMatchedStatus object of the DataReader. More...
 
TopicDescription< TYPE > getTopicDescription ()
 
InstanceHandle lookupInstance (PROTOBUF_TYPE keyHolder)
 
Iterator< TYPE > read ()
 This operation accesses a collection of samples from this DataReader. More...
 
Iterator< TYPE > read (org.omg.dds.sub.DataReader.Selector< TYPE > query)
 
Iterator< TYPE > read (int maxSamples)
 This operation accesses a collection of samples from this DataReader. More...
 
List< Sample< TYPE > > read (List< Sample< TYPE >> samples)
 This operation accesses a collection of samples from this DataReader. More...
 
List< Sample< TYPE > > read (List< Sample< TYPE >> samples, org.omg.dds.sub.DataReader.Selector< TYPE > selector)
 
boolean readNextSample (Sample< PROTOBUF_TYPE > sample)
 
void registerIterator (AbstractIterator< TYPE > iterator)
 
void returnLoan (Object sampleSeqHolder, DDS.SampleInfoSeqHolder infoSeqHolder)
 
org.omg.dds.sub.DataReader.Selector< TYPE > select ()
 Provides a Selector that can be used to refine what read or take methods return. More...
 
void setListener (DataReaderListener< TYPE > listener)
 
void setListener (DataReaderListener< TYPE > listener, Collection< Class<? extends Status >> statuses)
 
void setListener (DataReaderListener< TYPE > listener, Class<? extends Status >... statuses)
 
void setProperty (String key, String value)
 
void setQos (DataReaderQos qos)
 
Iterator< TYPE > take ()
 This operation accesses a collection of samples from this DataReader. More...
 
Iterator< TYPE > take (int maxSamples)
 This operation accesses a collection of samples from this DataReader. More...
 
Iterator< TYPE > take (org.omg.dds.sub.DataReader.Selector< TYPE > query)
 
List< Sample< TYPE > > take (List< Sample< TYPE >> samples)
 This operation accesses a collection of samples from this DataReader. More...
 
List< Sample< TYPE > > take (List< Sample< TYPE >> samples, org.omg.dds.sub.DataReader.Selector< TYPE > selector)
 
boolean takeNextSample (Sample< PROTOBUF_TYPE > sample)
 
void waitForHistoricalData (Duration maxWait) throws TimeoutException
 This operation is intended only for DataReader entities for which org.omg.dds.core.policy.Durability#getKind() is not org.omg.dds.core.policy.Durability.Kind#VOLATILE. More...
 
void waitForHistoricalData (long maxWait, TimeUnit unit) throws TimeoutException
 This operation is intended only for DataReader entities for which org.omg.dds.core.policy.Durability#getKind() is not org.omg.dds.core.policy.Durability.Kind#VOLATILE. More...
 
void waitForHistoricalData (String filterExpression, List< String > filterParameters, Time minSourceTimestamp, Time maxSourceTimestamp, ResourceLimits resourceLimits, Duration maxWait) throws TimeoutException
 
void waitForHistoricalData (String filterExpression, List< String > filterParameters, Time minSourceTimestamp, Time maxSourceTimestamp, Duration maxWait) throws TimeoutException
 
void waitForHistoricalData (String filterExpression, List< String > filterParameters, ResourceLimits resourceLimits, Duration maxWait) throws TimeoutException
 
void waitForHistoricalData (String filterExpression, List< String > filterParameters, Duration maxWait) throws TimeoutException
 
void waitForHistoricalData (Time minSourceTimestamp, Time maxSourceTimestamp, ResourceLimits resourceLimits, Duration maxWait) throws TimeoutException
 
void waitForHistoricalData (Time minSourceTimestamp, Time maxSourceTimestamp, Duration maxWait) throws TimeoutException
 
void waitForHistoricalData (ResourceLimits resourceLimits, Duration maxWait) throws TimeoutException
 
void waitForHistoricalData (String filterExpression, List< String > filterParameters, Time minSourceTimestamp, Time maxSourceTimestamp, ResourceLimits resourceLimits, long maxWait, TimeUnit unit) throws TimeoutException
 
void waitForHistoricalData (String filterExpression, List< String > filterParameters, Time minSourceTimestamp, Time maxSourceTimestamp, long maxWait, TimeUnit unit) throws TimeoutException
 
void waitForHistoricalData (String filterExpression, List< String > filterParameters, ResourceLimits resourceLimits, long maxWait, TimeUnit unit) throws TimeoutException
 
void waitForHistoricalData (String filterExpression, List< String > filterParameters, long maxWait, TimeUnit unit) throws TimeoutException
 
void waitForHistoricalData (Time minSourceTimestamp, Time maxSourceTimestamp, ResourceLimits resourceLimits, long maxWait, TimeUnit unit) throws TimeoutException
 
void waitForHistoricalData (Time minSourceTimestamp, Time maxSourceTimestamp, long maxWait, TimeUnit unit) throws TimeoutException
 
void waitForHistoricalData (ResourceLimits resourceLimits, long maxWait, TimeUnit unit) throws TimeoutException
 

Protected Member Functions

void destroy ()
 
ReflectionDataReader<?, PROTOBUF_TYPE > getReflectionReader ()
 

Protected Attributes

final HashMap< DDS.Condition, ReadConditionImpl< TYPE > > conditions
 
final HashSet< AbstractIterator< TYPE > > iterators
 
final Selector< TYPE > selector
 
final TopicDescriptionExt< TYPE > topicDescription
 

Detailed Description

Definition at line 43 of file DataReaderProtobuf.java.

Constructor & Destructor Documentation

◆ DataReaderProtobuf()

org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.DataReaderProtobuf ( OsplServiceEnvironment  environment,
SubscriberImpl  parent,
TopicDescriptionExt< PROTOBUF_TYPE >  topicDescription,
DataReaderQos  qos,
DataReaderListener< PROTOBUF_TYPE >  listener,
Collection< Class<? extends Status >>  statuses 
)

Definition at line 50 of file DataReaderProtobuf.java.

Member Function Documentation

◆ closeContainedEntities()

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.closeContainedEntities ( )
inherited

This operation closes all the entities that were created by means of the "create" operations on the DataReader.

That is, it closes all contained ReadCondition and QueryCondition objects.

Exceptions
org.omg.dds.core.PreconditionNotMetExceptionif the any of the contained entities is in a state where it cannot be closed.

Definition at line 183 of file AbstractDataReader.java.

◆ createIterator() [1/2]

Iterator<PROTOBUF_TYPE> org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.createIterator ( Object  sampleSeqHolder,
Field  sampleSeqHolderValueField,
SampleInfoSeqHolder  info 
)

Definition at line 214 of file DataReaderProtobuf.java.

◆ createIterator() [2/2]

abstract Sample.Iterator<?> org.opensplice.dds.sub.AbstractDataReader< TYPE >.createIterator ( Object  sampleSeqHolder,
Field  sampleSeqHolderValueField,
DDS.SampleInfoSeqHolder  info 
)
abstractinherited

◆ createQueryCondition() [1/4]

QueryCondition<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.createQueryCondition ( String  queryExpression,
List< String >  queryParameters 
)
inherited

This operation creates a QueryCondition.

The returned QueryCondition will be attached and belong to the DataReader. It will trigger on any sample state, view state, or instance state.

The selection of the content is done using the queryExpression with parameters queryParameters.

  • The queryExpression attribute is a string that specifies the criteria to select the data samples of interest. It is similar to the WHERE part of an SQL clause.
  • The queryParameters attribute is a sequence of strings that give values to the "parameters" (i.e., "%n" tokens) in the queryExpression. The number of supplied parameters must fit with the requested values in the queryExpression (i.e., the number of "%n" tokens).
Example:

This example assumes a Subscriber called "subscriber" and DataReader named "fooDr" has been created
and a datatype called Foo is present: class Foo { int age; String name; };
// Create a QueryCondition
// And apply a condition that only samples with age > 0 and name equals BILL are shown.
String expr = "age &gt; %0 AND name = %1");
List<String> params = new ArrayList<String>();
params.add("0");
params.add("BILL");
QueryCondition<Foo> queryCond = fooDr.createQueryCondition(expr,params);

Returns
a new QueryCondition
Parameters
queryExpressionThe returned condition will only trigger on samples that pass this content-based filter expression.
queryParametersA set of parameter values for the queryExpression.
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
createQueryCondition(org.omg.dds.sub.Subscriber.DataState, String, List)

Definition at line 120 of file AbstractDataReader.java.

◆ createQueryCondition() [2/4]

QueryCondition<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.createQueryCondition ( DataState  states,
String  queryExpression,
List< String >  queryParameters 
)
inherited

This operation creates a QueryCondition.

The returned QueryCondition will be attached and belong to the DataReader.

The selection of the content is done using the queryExpression with parameters queryParameters.

  • The queryExpression attribute is a string that specifies the criteria to select the data samples of interest. It is similar to the WHERE part of an SQL clause.
  • The queryParameters attribute is a sequence of strings that give values to the "parameters" (i.e., "%n" tokens) in the queryExpression. The number of supplied parameters must fit with the requested values in the queryExpression (i.e., the number of "%n" tokens).

State Masks

The result of the QueryCondition also depends on the selection of samples determined by three org.omg.dds.sub.Subscriber.DataState masks:

  • org.omg.dds.sub.SampleState is the mask, which selects only those samples with the desired sample states READ, NOT_READ or both.
  • org.omg.dds.sub.ViewState is the mask, which selects only those samples with the desired view states NEW, NOT_NEW or both
  • org.omg.dds.sub.InstanceState is the mask, which selects only those samples with the desired instance states ALIVE_INSTANCE, NOT_ALIVE_DISPOSED, NOT_ALIVE_NO_WRITERS or a combination of these.
Example:

This example assumes a Subscriber called "subscriber" and DataReader named "fooDr" has been created
and a datatype called Foo is present: class Foo { int age; String name; };
// Create a QueryCondition with a DataState with a sample state of not read, new view state and alive instance state.
// And apply a condition that only samples with age > 0 and name equals BILL are shown.
DataState ds = subscriber.createDataState();
ds = ds.with(SampleState.NOT_READ)
       .with(ViewState.NEW)
       .with(InstanceState.ALIVE);
String expr = "age &gt; %0 AND name = %1");
List<String> params = new ArrayList<String>();
params.add("0");
params.add("BILL");
QueryCondition<Foo> queryCond = fooDr.createQueryCondition(ds,expr,params);

Returns
a new QueryCondition
Parameters
statesThe returned condition will only trigger on samples with one of these sample states, view states, and instance states.
queryExpressionThe returned condition will only trigger on samples that pass this content-based filter expression.
queryParametersA set of parameter values for the queryExpression.
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
#createQueryCondition(String, List)

Definition at line 128 of file AbstractDataReader.java.

◆ createQueryCondition() [3/4]

QueryCondition<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.createQueryCondition ( String  queryExpression,
String...  queryParameters 
)
inherited

This operation creates a QueryCondition.

The returned QueryCondition will be attached and belong to the DataReader. It will trigger on any sample state, view state, or instance state.

The selection of the content is done using the queryExpression with parameters queryParameters.

  • The queryExpression attribute is a string that specifies the criteria to select the data samples of interest. It is similar to the WHERE part of an SQL clause.
  • The queryParameters attribute is a sequence of strings that give values to the "parameters" (i.e., "%n" tokens) in the queryExpression. The number of supplied parameters must fit with the requested values in the queryExpression (i.e., the number of "%n" tokens).
Example:

This example assumes a Subscriber called "subscriber" and DataReader named "fooDr" has been created
and a datatype called Foo is present: class Foo { int age; String name; };
// Create a QueryCondition
// And apply a condition that only samples with age > 0 and name equals BILL are shown.
String expr = "age &gt; %0 AND name = %1");
QueryCondition<Foo> queryCond = fooDr.createQueryCondition(expr,"0","BILL");

Returns
a new QueryCondition
Parameters
queryExpressionThe returned condition will only trigger on samples that pass this content-based filter expression.
queryParametersA set of parameter values for the queryExpression.
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
createQueryCondition(org.omg.dds.sub.Subscriber.DataState, String, List)

Definition at line 149 of file AbstractDataReader.java.

◆ createQueryCondition() [4/4]

QueryCondition<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.createQueryCondition ( DataState  states,
String  queryExpression,
String...  queryParameters 
)
inherited

This operation creates a QueryCondition.

The returned QueryCondition will be attached and belong to the DataReader.

The selection of the content is done using the queryExpression with parameters queryParameters.

  • The queryExpression attribute is a string that specifies the criteria to select the data samples of interest. It is similar to the WHERE part of an SQL clause.
  • The queryParameters attribute is a sequence of strings that give values to the "parameters" (i.e., "%n" tokens) in the queryExpression. The number of supplied parameters must fit with the requested values in the queryExpression (i.e., the number of "%n" tokens).

State Masks

The result of the QueryCondition also depends on the selection of samples determined by three org.omg.dds.sub.Subscriber.DataState masks:

  • org.omg.dds.sub.SampleState is the mask, which selects only those samples with the desired sample states READ, NOT_READ or both.
  • org.omg.dds.sub.ViewState is the mask, which selects only those samples with the desired view states NEW, NOT_NEW or both
  • org.omg.dds.sub.InstanceState is the mask, which selects only those samples with the desired instance states ALIVE_INSTANCE, NOT_ALIVE_DISPOSED, NOT_ALIVE_NO_WRITERS or a combination of these.
Example:

This example assumes a Subscriber called "subscriber" and DataReader named "fooDr" has been created
and a datatype called Foo is present: class Foo { int age; String name; };
// Create a QueryCondition with a DataState with a sample state of not read, new view state and alive instance state.
// And apply a condition that only samples with age > 0 and name equals BILL are shown.
DataState ds = subscriber.createDataState();
ds = ds.with(SampleState.NOT_READ)
       .with(ViewState.NEW)
       .with(InstanceState.ALIVE);
String expr = "age &gt; %0 AND name = %1");
QueryCondition<Foo> queryCond = fooDr.createQueryCondition(ds,expr,"0","BILL");

Returns
a new QueryCondition
Parameters
statesThe returned condition will only trigger on samples with one of these sample states, view states, and instance states.
queryExpressionThe returned condition will only trigger on samples that pass this content-based filter expression.
queryParametersA set of parameter values for the queryExpression.
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
#createQueryCondition(String, List)

Definition at line 156 of file AbstractDataReader.java.

◆ createReadCondition()

ReadCondition<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.createReadCondition ( DataState  states)
inherited

This operation creates a ReadCondition.

The returned ReadCondition will be attached and belong to the DataReader.

State Masks

The result of the ReadCondition depends on the selection of samples determined by three org.omg.dds.sub.Subscriber.DataState masks:

  • org.omg.dds.sub.SampleState is the mask, which selects only those samples with the desired sample states READ, NOT_READ or both.
  • org.omg.dds.sub.ViewState is the mask, which selects only those samples with the desired view states NEW, NOT_NEW or both
  • org.omg.dds.sub.InstanceState is the mask, which selects only those samples with the desired instance states ALIVE_INSTANCE, NOT_ALIVE_DISPOSED, NOT_ALIVE_NO_WRITERS or a combination of these.
Example:

This example assumes a Subscriber called "subscriber" and DataReader named "fooDr" has been created
and a datatype called Foo is present: class Foo { int age; String name; };
// Create a ReadCondition with a DataState with a sample state of not read, new view state and alive instance state.
DataState ds = subscriber.createDataState();
ds = ds.with(SampleState.NOT_READ)
       .with(ViewState.NEW)
       .with(InstanceState.ALIVE);
ReadCondition<Foo> readCond = fooDr.createReadCondition(ds);

Returns
a new ReadCondition
Parameters
statesThe returned condition will only trigger on samples with one of these sample states, view states, and instance states.
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.

Definition at line 103 of file AbstractDataReader.java.

◆ deregisterIterator()

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.deregisterIterator ( AbstractIterator< TYPE >  iterator)
inherited

Definition at line 94 of file AbstractDataReader.java.

◆ destroy()

void org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.destroy ( )
protected

Definition at line 101 of file DataReaderProtobuf.java.

◆ destroyReadCondition()

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.destroyReadCondition ( ReadConditionImpl< TYPE >  condition)
inherited

Definition at line 170 of file AbstractDataReader.java.

◆ getKeyValue() [1/2]

PROTOBUF_TYPE org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.getKeyValue ( PROTOBUF_TYPE  keyHolder,
InstanceHandle  handle 
)

Definition at line 136 of file DataReaderProtobuf.java.

◆ getKeyValue() [2/2]

PROTOBUF_TYPE org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.getKeyValue ( InstanceHandle  handle)

Definition at line 142 of file DataReaderProtobuf.java.

◆ getLivelinessChangedStatus()

LivelinessChangedStatus org.opensplice.dds.sub.AbstractDataReader< TYPE >.getLivelinessChangedStatus ( )
inherited

This operation obtains the LivelinessChangedStatus object of the DataReader.

This object contains the information whether the liveliness of one or more DataWriter objects that were writing instances read by the DataReader has changed. In other words, some DataWriter have become "alive" or "not alive".

The LivelinessChangedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Returns
the LivelinessChangedStatus 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
org.omg.dds.core.status.LivelinessChangedStatus

Definition at line 306 of file AbstractDataReader.java.

◆ getMatchedPublicationData()

PublicationBuiltinTopicData org.opensplice.dds.sub.AbstractDataReader< TYPE >.getMatchedPublicationData ( InstanceHandle  publicationHandle)
inherited

This operation retrieves information on a publication that is currently "associated" with the DataReader; that is, a publication with a matching org.omg.dds.topic.Topic and compatible QoS that the application has not indicated should be "ignored" by means of org.omg.dds.domain.DomainParticipant#ignorePublication(InstanceHandle).

The operation getMatchedPublications() can be used to find the publications that are currently matched with the DataReader.

Parameters
publicationHandlea handle to the publication, the data of which is to be retrieved.
Returns
a new object containing a copy of the information.
Exceptions
IllegalArgumentExceptionif the publicationHandle does not correspond to a publication currently associated with the DataReader.
UnsupportedOperationExceptionif the infrastructure does not hold the information necessary to fill in the publicationData.
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.
UnsupportedOperationExceptionif the infrastructure does not hold the information necessary to fill in the publicationnData.
See also
getMatchedPublications()

Definition at line 480 of file AbstractDataReader.java.

◆ getMatchedPublications()

Set<InstanceHandle> org.opensplice.dds.sub.AbstractDataReader< TYPE >.getMatchedPublications ( )
inherited

This operation retrieves the list of publications currently "associated" with the DataReader; that is, publications that have a matching org.omg.dds.topic.Topic and compatible QoS that the application has not indicated should be "ignored" by means of org.omg.dds.domain.DomainParticipant#ignorePublication(InstanceHandle).

The handles returned in the 'publicationHandles' list are the ones that are used by the DDS implementation to locally identify the corresponding matched DataWriter entities. These handles match the ones that appear in org.omg.dds.sub.Sample#getInstanceHandle() when reading the "DCPSPublications" built-in topic.

Be aware that since an instance handle is an opaque datatype, it does not necessarily mean that the handles obtained from the getMatchedPublications operation have the same value as the ones that appear in the instanceHandle field of the SampleInfo when retrieving the subscription info through corresponding "DCPSPublications" built-in reader. You can't just compare two handles to determine whether they represent the same publication. If you want to know whether two handles actually do represent the same subscription, use both handles to retrieve their corresponding PublicationBuiltinTopicData samples and then compare the key field of both samples.

The operation may fail with an UnsupportedOperationException if the infrastructure does not locally maintain the connectivity information.

Returns
a new collection containing a copy of the information.
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.
UnsupportedOperationExceptionif the infrastructure does not hold the information necessary to fill in the publicationnData.
See also
getMatchedPublicationData(InstanceHandle)

Definition at line 475 of file AbstractDataReader.java.

◆ getParent()

Returns
the factory object that created this entity.

Definition at line 215 of file AbstractDataReader.java.

◆ getPreAllocator() [1/2]

PreAllocator<PROTOBUF_TYPE> org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.getPreAllocator ( List< Sample< PROTOBUF_TYPE >>  samples,
Class<?>  sampleSeqHolderClz,
Field  sampleSeqHolderValueField 
)

Definition at line 107 of file DataReaderProtobuf.java.

◆ getPreAllocator() [2/2]

abstract PreAllocator<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.getPreAllocator ( List< Sample< TYPE >>  samples,
Class<?>  sampleSeqHolderClz,
Field  sampleSeqHolderValueField 
)
abstractinherited

◆ getProperty()

String org.opensplice.dds.sub.AbstractDataReader< TYPE >.getProperty ( String  key)
inherited

Definition at line 268 of file AbstractDataReader.java.

◆ getQos()

Definition at line 291 of file AbstractDataReader.java.

◆ getReflectionReader()

ReflectionDataReader<?, PROTOBUF_TYPE> org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.getReflectionReader ( )
protected

Definition at line 131 of file DataReaderProtobuf.java.

◆ getRequestedDeadlineMissedStatus()

RequestedDeadlineMissedStatus org.opensplice.dds.sub.AbstractDataReader< TYPE >.getRequestedDeadlineMissedStatus ( )
inherited

This operation obtains the RequestedDeadlineMissedStatus object of the DataReader.

This object contains the information whether the deadline that the DataReader was expecting through its DeadlineQosPolicy was not respected for a specific instance.

The RequestedDeadlineMissedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Returns
the RequestedDeadlineMissedStatus 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
org.omg.dds.core.status.RequestedDeadlineMissedStatus

Definition at line 311 of file AbstractDataReader.java.

◆ getRequestedIncompatibleQosStatus()

RequestedIncompatibleQosStatus org.opensplice.dds.sub.AbstractDataReader< TYPE >.getRequestedIncompatibleQosStatus ( )
inherited

This operation obtains the RequestedIncompatibleQosStatus object of the DataReader.

This object contains the information whether a QosPolicy setting was incompatible with the offered QosPolicy setting. The Request/Offering mechanism is applicable between the DataWriter and the DataReader. If the QosPolicy settings between DataWriter and DataReader are inconsistent, no communication between them is established. In addition the DataWriter will be informed via a RequestedIncompatibleQos status change and the DataReader will be informed via an OfferedIncompatibleQos status change.

The RequestedIncompatibleQosStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Returns
the RequestedDeadlineMissedStatus 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
org.omg.dds.core.status.RequestedIncompatibleQosStatus

Definition at line 316 of file AbstractDataReader.java.

◆ getSampleLostStatus()

SampleLostStatus org.opensplice.dds.sub.AbstractDataReader< TYPE >.getSampleLostStatus ( )
inherited

This operation obtains the SampleLostStatus object of the DataReader.

This object contains information whether samples have been lost. This only applies when the ReliabilityQosPolicy is set to RELIABLE. If the ReliabilityQosPolicy is set to BEST_EFFORT the Data Distribution Service will not report the loss of samples.

The SampleLostStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Returns
the SampleLostStatus 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
org.omg.dds.core.status.SampleLostStatus

Definition at line 326 of file AbstractDataReader.java.

◆ getSampleRejectedStatus()

SampleRejectedStatus org.opensplice.dds.sub.AbstractDataReader< TYPE >.getSampleRejectedStatus ( )
inherited

This operation obtains the SampleRejectedStatus object of the DataReader.

This object contains the information whether a received sample has been rejected. Samples may be rejected by the DataReader when it runs out of resourceLimits to store incoming samples. Usually this means that old samples need to be 'consumed' (for example by 'taking' them instead of 'reading' them) to make room for newly incoming samples.

The SampleRejectedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Returns
the SampleRejectedStatus 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
org.omg.dds.core.status.SampleRejectedStatus

Definition at line 301 of file AbstractDataReader.java.

◆ getStatusCondition()

StatusCondition<DataReader<TYPE> > org.opensplice.dds.sub.AbstractDataReader< TYPE >.getStatusCondition ( )
inherited

Definition at line 549 of file AbstractDataReader.java.

◆ getSubscriptionMatchedStatus()

SubscriptionMatchedStatus org.opensplice.dds.sub.AbstractDataReader< TYPE >.getSubscriptionMatchedStatus ( )
inherited

This operation obtains the SubscriptionMatchedStatus object of the DataReader.

This object contains the information whether a new match has been discovered for the current subscription, or whether an existing match has ceased to exist. This means that the status represents that either a DataWriter object has been discovered by the DataReader with the same Topic and a compatible Qos, or that a previously discovered DataWriter has ceased to be matched to the current DataReader. A DataWriter may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current DataReader or when either the DataReader or the DataWriter has chosen to put its matching counterpart on its ignore-list using the ignorePublication or ignoreSubcription operations on the DomainParticipant. The operation may fail if the infrastructure does not hold the information necessary to fill in the SubscriptionMatchedStatus. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In this case the operation will return an UnsupportedOperationException.

The SubscriptionMatchedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Returns
the SubscriptionMatchedStatus 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
org.omg.dds.core.status.SubscriptionMatchedStatus

Definition at line 321 of file AbstractDataReader.java.

◆ getTopicDescription()

TopicDescription<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.getTopicDescription ( )
inherited
Returns
the TopicDescription associated with the DataReader. This is the same TopicDescription that was used to create the DataReader.

Definition at line 256 of file AbstractDataReader.java.

◆ lookupInstance()

InstanceHandle org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.lookupInstance ( PROTOBUF_TYPE  keyHolder)

Definition at line 152 of file DataReaderProtobuf.java.

◆ read() [1/5]

Iterator<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.read ( )
inherited

This operation accesses a collection of samples from this DataReader.

It behaves exactly like read(Selector) except that the collection of returned samples is not constrained by any Selector. These samples contain the actual data and meta information.

Invalid Data
Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo indicates whether the corresponding data value contains any meaningful data. If not, the data value is just a 'dummy' sample for which only the keyfields have been assigned. It is used to accompany the SampleInfo that communicates a change in the instanceState of an instance for which there is no 'real' sample available.

For example, when an application always 'takes' all available samples of a particular instance, there is no sample available to report the disposal of that instance. In such a case the DataReader will insert a dummy sample into the data values sequence to accompany the SampleInfo element that communicates the disposal of the instance.

The act of reading a sample sets its sample_state to SampleState.READ. If the sample belongs to the most recent generation of the instance, it also sets the viewState of the instance to ViewState.NOT_NEW. It does not affect the instanceState of the instance.

Example:


// Read samples
Iterator<Sample<Foo>> samples = fooDr.read();
// Process each Sample and print its name and production time.
while (samples.hasNext()) {
    Sample sample = samples.next();
    Foo foo = sample.getData();
    if (foo != null) { //Check if the sample is valid.
         Time t = sample.getSourceTimestamp(); // meta information
         System.out.println("Name: " + foo.myName + " is produced at " + time.getTime(TimeUnit.SECONDS));
    }
}

Returns
a non-null unmodifiable iterator over loaned samples.
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
#read(Selector)
#read(List)
#read(List, Selector)
#readNextSample(Sample)
take()

Definition at line 497 of file AbstractDataReader.java.

◆ read() [2/5]

Definition at line 502 of file AbstractDataReader.java.

◆ read() [3/5]

Iterator<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.read ( int  maxSamples)
inherited

This operation accesses a collection of samples from this DataReader.

It behaves exactly like read() except that the returned samples are no more than #maxSamples.

Parameters
maxSamplesThe maximum number of samples to read
Returns
a non-null unmodifiable iterator over loaned samples.
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
read()
#read(Selector)
#read(List, Selector)
#readNextSample(Sample)
#take(List)

Definition at line 507 of file AbstractDataReader.java.

◆ read() [4/5]

List<Sample<TYPE> > org.opensplice.dds.sub.AbstractDataReader< TYPE >.read ( List< Sample< TYPE >>  samples)
inherited

This operation accesses a collection of samples from this DataReader.

It behaves exactly like read() except that the returned samples are not "on loan" from the Service; they are deeply copied to the application.

If the number of samples read are fewer than the current length of the list, the list will be trimmed to fit the samples read. If list is null, a new list will be allocated and its size may be zero or unbounded depending upon the number of samples read. If there are no samples, the list reference will be non-null and the list will contain zero samples.

The read operation will copy the data and meta-information into the elements already inside the given collection, overwriting any samples that might already be present. The use of this variant forces a copy but the application can control where the copy is placed and the application will not need to "return the loan."


// Read samples and store them in a pre allocated collection
List<Sample<Foo>> samples = new ArrayList<Sample<Foo>>();
fooDr.read(samples);
// Process each Sample and print its name and production time.
for (Sample<Foo> sample : samples) {
    Foo foo = sample.getData();
    if (foo != null) { //Check if the sample is valid.
         Time t = sample.getSourceTimestamp();
         System.out.println("Name: " + foo.myName + " is produced at " + time.getTime(TimeUnit.SECONDS));
    }
}

Parameters
samplesA pre allocated collection to store the samples in
Returns
samples, for convenience.
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
read()
#read(Selector)
#read(List, Selector)
#readNextSample(Sample)
#take(List)

Definition at line 512 of file AbstractDataReader.java.

◆ read() [5/5]

List<Sample<TYPE> > org.opensplice.dds.sub.AbstractDataReader< TYPE >.read ( List< Sample< TYPE >>  samples,
org.omg.dds.sub.DataReader.Selector< TYPE >  selector 
)
inherited

Definition at line 517 of file AbstractDataReader.java.

◆ readNextSample()

boolean org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.readNextSample ( Sample< PROTOBUF_TYPE >  sample)

Definition at line 158 of file DataReaderProtobuf.java.

◆ registerIterator()

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.registerIterator ( AbstractIterator< TYPE >  iterator)
inherited

Definition at line 88 of file AbstractDataReader.java.

◆ returnLoan()

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.returnLoan ( Object  sampleSeqHolder,
DDS.SampleInfoSeqHolder  infoSeqHolder 
)
inherited

Definition at line 491 of file AbstractDataReader.java.

◆ select()

Provides a Selector that can be used to refine what read or take methods return.

Returns
The Selector object returned by this method is the default selector. By default it selects org.omg.dds.core.policy.ResourceLimits#LENGTH_UNLIMITED samples. This is equivalent to calling org.omg.dds.sub.DataReader#read without any parameters.

Definition at line 487 of file AbstractDataReader.java.

◆ setListener() [1/3]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.setListener ( DataReaderListener< TYPE >  listener)
inherited

Definition at line 237 of file AbstractDataReader.java.

◆ setListener() [2/3]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.setListener ( DataReaderListener< TYPE >  listener,
Collection< Class<? extends Status >>  statuses 
)
inherited

Definition at line 242 of file AbstractDataReader.java.

◆ setListener() [3/3]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.setListener ( DataReaderListener< TYPE >  listener,
Class<? extends Status >...  statuses 
)
inherited

Definition at line 249 of file AbstractDataReader.java.

◆ setProperty()

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.setProperty ( String  key,
String  value 
)
inherited

Definition at line 261 of file AbstractDataReader.java.

◆ setQos()

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.setQos ( DataReaderQos  qos)
inherited

Definition at line 296 of file AbstractDataReader.java.

◆ take() [1/5]

Iterator<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.take ( )
inherited

This operation accesses a collection of samples from this DataReader.

The behavior is identical to read except for that the samples are removed from the DataReader.

Invalid Data
Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo indicates whether the corresponding data value contains any meaningful data. If not, the data value is just a 'dummy' sample for which only the keyfields have been assigned. It is used to accompany the SampleInfo that communicates a change in the instanceState of an instance for which there is no 'real' sample available.

For example, when an application always 'takes' all available samples of a particular instance, there is no sample available to report the disposal of that instance. In such a case the DataReader will insert a dummy sample into the data values sequence to accompany the SampleInfo element that communicates the disposal of the instance.

Example:


// Take samples
Iterator<Sample<Foo>> samples = fooDr.take();
// Process each Sample and print its name and production time.
while (samples.hasNext()) {
    Sample sample = samples.next();
    Foo foo = sample.getData();
    if (foo != null) { //Check if the sample is valid.
         Time t = sample.getSourceTimestamp(); // meta information
         System.out.println("Name: " + foo.myName + " is produced at " + time.getTime(TimeUnit.SECONDS));
    }
}

Returns
a non-null unmodifiable iterator over loaned samples.
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
#take(Selector)
#take(List)
#take(List, Selector)
#takeNextSample(Sample)
read()

Definition at line 523 of file AbstractDataReader.java.

◆ take() [2/5]

Iterator<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.take ( int  maxSamples)
inherited

This operation accesses a collection of samples from this DataReader.

It behaves exactly like take(Selector) except that the collection of returned samples is not constrained by any Selector.

The number of samples accessible via the iterator will not be more than #maxSamples.

Returns
a non-null unmodifiable iterator over loaned samples.
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
#take(Selector)
#take(List)
#take(List, Selector)
#takeNextSample(Sample)
read()

Definition at line 528 of file AbstractDataReader.java.

◆ take() [3/5]

Definition at line 533 of file AbstractDataReader.java.

◆ take() [4/5]

List<Sample<TYPE> > org.opensplice.dds.sub.AbstractDataReader< TYPE >.take ( List< Sample< TYPE >>  samples)
inherited

This operation accesses a collection of samples from this DataReader.

It behaves exactly like take() except that the returned samples are not "on loan" from the Service; they are deeply copied to the application.

The take operation will copy the data and meta-information into the elements already inside the given collection, overwriting any samples that might already be present. The use of this variant forces a copy but the application can control where the copy is placed and the application will not need to "return the loan."


// Take samples and store them in a pre allocated collection
List<Sample<Foo>> samples = new ArrayList<Sample<Foo>>();
fooDr.take(samples);
// Process each Sample and print its name and production time.
for (Sample<Foo> sample : samples) {
    Foo foo = sample.getData();
    if (foo != null) { //Check if the sample is valid.
         Time t = sample.getSourceTimestamp();
         System.out.println("Name: " + foo.myName + " is produced at " + time.getTime(TimeUnit.SECONDS));
    }
}

Parameters
samplesA pre allocated collection to store the samples in
Returns
samples, for convenience.
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
take()
#take(Selector)
#take(List, Selector)
#takeNextSample(Sample)
#read(List)

Definition at line 538 of file AbstractDataReader.java.

◆ take() [5/5]

List<Sample<TYPE> > org.opensplice.dds.sub.AbstractDataReader< TYPE >.take ( List< Sample< TYPE >>  samples,
org.omg.dds.sub.DataReader.Selector< TYPE >  selector 
)
inherited

Definition at line 543 of file AbstractDataReader.java.

◆ takeNextSample()

boolean org.opensplice.dds.sub.DataReaderProtobuf< PROTOBUF_TYPE, DDS_TYPE >.takeNextSample ( Sample< PROTOBUF_TYPE >  sample)

Definition at line 186 of file DataReaderProtobuf.java.

◆ waitForHistoricalData() [1/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( Duration  maxWait) throws TimeoutException
inherited

This operation is intended only for DataReader entities for which org.omg.dds.core.policy.Durability#getKind() is not org.omg.dds.core.policy.Durability.Kind#VOLATILE.

As soon as an application enables a non-VOLATILE DataReader it will start receiving both "historical" data, i.e., the data that was written prior to the time the DataReader joined the domain, as well as any new data written by the DataWriter entities. There are situations where the application logic may require the application to wait until all "historical" data is received. This is the purpose of this operation.

The operation blocks the calling thread until either all "historical" data is received, or else the duration specified by the maxWait parameter elapses, whichever happens first.

Parameters
maxWaitthe maximum duration to block for the waitForHistoricalData, after which the application thread is unblocked.
Exceptions
TimeoutExceptionif maxWait elapsed before all the data was received.
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.
org.omg.dds.core.PreconditionNotMetExceptionCan happen when requesting conditional alignment on non-volatile readers or Historical data request already in progress or complete.
See also
waitForHistoricalData(long, TimeUnit)

Definition at line 331 of file AbstractDataReader.java.

◆ waitForHistoricalData() [2/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( long  maxWait,
TimeUnit  unit 
) throws TimeoutException
inherited

This operation is intended only for DataReader entities for which org.omg.dds.core.policy.Durability#getKind() is not org.omg.dds.core.policy.Durability.Kind#VOLATILE.

As soon as an application enables a non-VOLATILE DataReader it will start receiving both "historical" data, i.e., the data that was written prior to the time the DataReader joined the domain, as well as any new data written by the DataWriter entities. There are situations where the application logic may require the application to wait until all "historical" data is received. This is the purpose of this operation.

The operation blocks the calling thread until either all "historical" data is received, or else the duration specified by the maxWait parameter elapses, whichever happens first.

Parameters
maxWaitThe maximum duration to block for the waitForHistoricalData, after which the application thread is unblocked.
unitThe TimeUnit which the sourceTimestamp describes (i.e. TimeUnit.SECONDS or TimeUnit.MILLISECONDS)
Exceptions
TimeoutExceptionif maxWait elapsed before all the data was received.
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.
org.omg.dds.core.PreconditionNotMetExceptionCan happen when requesting conditional alignment on non-volatile readers or Historical data request already in progress or complete.
See also
waitForHistoricalData(Duration)

Definition at line 336 of file AbstractDataReader.java.

◆ waitForHistoricalData() [3/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( String  filterExpression,
List< String >  filterParameters,
Time  minSourceTimestamp,
Time  maxSourceTimestamp,
ResourceLimits  resourceLimits,
Duration  maxWait 
) throws TimeoutException
inherited

Definition at line 342 of file AbstractDataReader.java.

◆ waitForHistoricalData() [4/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( String  filterExpression,
List< String >  filterParameters,
Time  minSourceTimestamp,
Time  maxSourceTimestamp,
Duration  maxWait 
) throws TimeoutException
inherited

Definition at line 352 of file AbstractDataReader.java.

◆ waitForHistoricalData() [5/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( String  filterExpression,
List< String >  filterParameters,
ResourceLimits  resourceLimits,
Duration  maxWait 
) throws TimeoutException
inherited

Definition at line 361 of file AbstractDataReader.java.

◆ waitForHistoricalData() [6/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( String  filterExpression,
List< String >  filterParameters,
Duration  maxWait 
) throws TimeoutException
inherited

Definition at line 370 of file AbstractDataReader.java.

◆ waitForHistoricalData() [7/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( Time  minSourceTimestamp,
Time  maxSourceTimestamp,
ResourceLimits  resourceLimits,
Duration  maxWait 
) throws TimeoutException
inherited

Definition at line 380 of file AbstractDataReader.java.

◆ waitForHistoricalData() [8/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( Time  minSourceTimestamp,
Time  maxSourceTimestamp,
Duration  maxWait 
) throws TimeoutException
inherited

Definition at line 390 of file AbstractDataReader.java.

◆ waitForHistoricalData() [9/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( ResourceLimits  resourceLimits,
Duration  maxWait 
) throws TimeoutException
inherited

Definition at line 399 of file AbstractDataReader.java.

◆ waitForHistoricalData() [10/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( String  filterExpression,
List< String >  filterParameters,
Time  minSourceTimestamp,
Time  maxSourceTimestamp,
ResourceLimits  resourceLimits,
long  maxWait,
TimeUnit  unit 
) throws TimeoutException
inherited

Definition at line 408 of file AbstractDataReader.java.

◆ waitForHistoricalData() [11/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( String  filterExpression,
List< String >  filterParameters,
Time  minSourceTimestamp,
Time  maxSourceTimestamp,
long  maxWait,
TimeUnit  unit 
) throws TimeoutException
inherited

Definition at line 418 of file AbstractDataReader.java.

◆ waitForHistoricalData() [12/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( String  filterExpression,
List< String >  filterParameters,
ResourceLimits  resourceLimits,
long  maxWait,
TimeUnit  unit 
) throws TimeoutException
inherited

Definition at line 428 of file AbstractDataReader.java.

◆ waitForHistoricalData() [13/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( String  filterExpression,
List< String >  filterParameters,
long  maxWait,
TimeUnit  unit 
) throws TimeoutException
inherited

Definition at line 438 of file AbstractDataReader.java.

◆ waitForHistoricalData() [14/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( Time  minSourceTimestamp,
Time  maxSourceTimestamp,
ResourceLimits  resourceLimits,
long  maxWait,
TimeUnit  unit 
) throws TimeoutException
inherited

Definition at line 448 of file AbstractDataReader.java.

◆ waitForHistoricalData() [15/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( Time  minSourceTimestamp,
Time  maxSourceTimestamp,
long  maxWait,
TimeUnit  unit 
) throws TimeoutException
inherited

Definition at line 457 of file AbstractDataReader.java.

◆ waitForHistoricalData() [16/16]

void org.opensplice.dds.sub.AbstractDataReader< TYPE >.waitForHistoricalData ( ResourceLimits  resourceLimits,
long  maxWait,
TimeUnit  unit 
) throws TimeoutException
inherited

Definition at line 466 of file AbstractDataReader.java.

Member Data Documentation

◆ conditions

final HashMap<DDS.Condition, ReadConditionImpl<TYPE> > org.opensplice.dds.sub.AbstractDataReader< TYPE >.conditions
protectedinherited

Definition at line 73 of file AbstractDataReader.java.

◆ iterators

final HashSet<AbstractIterator<TYPE> > org.opensplice.dds.sub.AbstractDataReader< TYPE >.iterators
protectedinherited

Definition at line 74 of file AbstractDataReader.java.

◆ selector

final Selector<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.selector
protectedinherited

Definition at line 75 of file AbstractDataReader.java.

◆ topicDescription

final TopicDescriptionExt<TYPE> org.opensplice.dds.sub.AbstractDataReader< TYPE >.topicDescription
protectedinherited

Definition at line 72 of file AbstractDataReader.java.


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