OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
org.omg.dds.core.policy.ReaderDataLifecycle Interface Reference

Specifies the behavior of the org.omg.dds.sub.DataReader with regards to the life cycle of the data instances it manages. More...

Inheritance diagram for org.omg.dds.core.policy.ReaderDataLifecycle:
Inheritance graph
Collaboration diagram for org.omg.dds.core.policy.ReaderDataLifecycle:
Collaboration graph

Public Member Functions

Duration getAutoPurgeDisposedSamplesDelay ()
 
Duration getAutoPurgeNoWriterSamplesDelay ()
 
ServiceEnvironment getEnvironment ()
 
ReaderDataLifecycle withAutoPurgeDisposedSamplesDelay (Duration autoPurgeDisposedSamplesDelay)
 Copy this policy and override the value of the property. More...
 
ReaderDataLifecycle withAutoPurgeDisposedSamplesDelay (long autoPurgeDisposedSamplesDelay, TimeUnit unit)
 Copy this policy and override the value of the property. More...
 
ReaderDataLifecycle withAutoPurgeNoWriterSamplesDelay (Duration autoPurgeNoWriterSamplesDelay)
 Copy this policy and override the value of the property. More...
 
ReaderDataLifecycle withAutoPurgeNoWriterSamplesDelay (long autoPurgeNoWriterSamplesDelay, TimeUnit unit)
 Copy this policy and override the value of the property. More...
 

Detailed Description

Specifies the behavior of the org.omg.dds.sub.DataReader with regards to the life cycle of the data instances it manages.

Concerns: org.omg.dds.sub.DataReader

RxO: N/A

Changeable: Yes

This policy controls the behavior of the DataReader with regards to the lifecycle of the data instances it manages, that is, the data instance that have been received and for which the DataReader maintains some internal resources.

The DataReader internally maintains the samples that have not been taken by the application, subject to the constraints imposed by other QoS policies such as org.omg.dds.core.policy.History and org.omg.dds.core.policy.ResourceLimits.

The DataReader also maintains information regarding the identity, org.omg.dds.sub.ViewState and org.omg.dds.sub.InstanceState of data instances even after all samples have been 'taken.' This is needed to properly compute the states when future samples arrive.

Under normal circumstances the DataReader can only reclaim all resources for instances for which there are no writers and for which all samples have been 'taken.' The last sample the DataReader will have taken for that instance will have an instance state of either org.omg.dds.sub.InstanceState#NOT_ALIVE_NO_WRITERS or org.omg.dds.sub.InstanceState#NOT_ALIVE_DISPOSED depending on whether the last writer that had ownership of the instance disposed it or not. In the absence of the READER_DATA_LIFECYCLE QoS this behavior could cause problems if the application "forgets" to 'take' those samples. The 'untaken' samples will prevent the DataReader from reclaiming the resources and they would remain in the DataReader indefinitely.

The autoPurgeNoWriterSamplesDelay defines the maximum duration for which the DataReader will maintain information regarding an instance once its instance state becomes NOT_ALIVE_NO_WRITERS. After this time elapses, the DataReader will purge all internal information regarding the instance; any untaken samples will also be lost.

The autoPurgeDisposedSamplesDelay defines the maximum duration for which the DataReader will maintain samples for an instance once its instance state becomes NOT_ALIVE_DISPOSED. After this time elapses, the DataReader will purge all samples for the instance.

See also
History
ResourceLimits

Definition at line 77 of file ReaderDataLifecycle.java.

Member Function Documentation

◆ getAutoPurgeDisposedSamplesDelay()

Duration org.omg.dds.core.policy.ReaderDataLifecycle.getAutoPurgeDisposedSamplesDelay ( )
Returns
the duration of the autoPurgeDisposedSamplesDelay

Implemented in org.opensplice.dds.core.policy.ReaderDataLifecycleImpl.

◆ getAutoPurgeNoWriterSamplesDelay()

Duration org.omg.dds.core.policy.ReaderDataLifecycle.getAutoPurgeNoWriterSamplesDelay ( )
Returns
the duration of the autoPurgeNoWriterSamplesDelay

Implemented in org.opensplice.dds.core.policy.ReaderDataLifecycleImpl.

◆ getEnvironment()

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.

◆ withAutoPurgeDisposedSamplesDelay() [1/2]

ReaderDataLifecycle org.omg.dds.core.policy.ReaderDataLifecycle.withAutoPurgeDisposedSamplesDelay ( Duration  autoPurgeDisposedSamplesDelay)

Copy this policy and override the value of the property.

Parameters
autoPurgeDisposedSamplesDelaySpecifies a duration autoPurgeDisposedSamplesDelay for which the DataReader will maintain information regarding a data instance for which the instance_state becomes NOT_ALIVE_DISPOSED. By default the duration value is DURATION_INFINITE. When the delay time has expired, the data instance is marked so that it can be purged in the next garbage collection sweep.
Returns
a new ReaderDataLifecycle policy

Implemented in org.opensplice.dds.core.policy.ReaderDataLifecycleImpl.

◆ withAutoPurgeDisposedSamplesDelay() [2/2]

ReaderDataLifecycle org.omg.dds.core.policy.ReaderDataLifecycle.withAutoPurgeDisposedSamplesDelay ( long  autoPurgeDisposedSamplesDelay,
TimeUnit  unit 
)

Copy this policy and override the value of the property.

Parameters
autoPurgeDisposedSamplesDelaySpecifies a long autoPurgeDisposedSamplesDelay for which the DataReader will maintain information regarding a data instance for which the instance_state becomes NOT_ALIVE_DISPOSED. By default the duration value is DURATION_INFINITE. When the delay time has expired, the data instance is marked so that it can be purged in the next garbage collection sweep.
unitThe TimeUnit which the period describes (i.e. TimeUnit.SECONDS or TimeUnit.MILLISECONDS)
Returns
a new policy

Implemented in org.opensplice.dds.core.policy.ReaderDataLifecycleImpl.

◆ withAutoPurgeNoWriterSamplesDelay() [1/2]

ReaderDataLifecycle org.omg.dds.core.policy.ReaderDataLifecycle.withAutoPurgeNoWriterSamplesDelay ( Duration  autoPurgeNoWriterSamplesDelay)

Copy this policy and override the value of the property.

Parameters
autoPurgeNoWriterSamplesDelaySpecifies the duration for which the DataReader will maintain information regarding a data instance for which the instance_state becomes NOT_ALIVE_NO_WRITERS. By default the duration value is DURATION_INFINITE. When the delay time has expired, the data instance is marked so that it can be purged in the next garbage collection sweep.
Returns
a new ReaderDataLifecycle policy

Implemented in org.opensplice.dds.core.policy.ReaderDataLifecycleImpl.

◆ withAutoPurgeNoWriterSamplesDelay() [2/2]

ReaderDataLifecycle org.omg.dds.core.policy.ReaderDataLifecycle.withAutoPurgeNoWriterSamplesDelay ( long  autoPurgeNoWriterSamplesDelay,
TimeUnit  unit 
)

Copy this policy and override the value of the property.

Parameters
autoPurgeNoWriterSamplesDelaySpecifies a long autoPurgeNoWriterSamplesDelay for which the DataReader will maintain information regarding a data instance for which the instance_state becomes NOT_ALIVE_NO_WRITERS. By default the duration value is DURATION_INFINITE. When the delay time has expired, the data instance is marked so that it can be purged in the next garbage collection sweep.
unitThe TimeUnit which the period describes (i.e. TimeUnit.SECONDS or TimeUnit.MILLISECONDS)
Returns
a new ReaderDataLifecycle policy

Implemented in org.opensplice.dds.core.policy.ReaderDataLifecycleImpl.


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