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

This org.omg.dds.core.policy.QosPolicy is similar to the org.omg.dds.core.policy.Lifespan (applicable to org.omg.dds.topic.Topic and org.omg.dds.pub.DataWriter), but limited to the DataReader on which the policy is applied. More...

Inheritance diagram for org.opensplice.dds.core.policy.ReaderLifespan:
Inheritance graph
Collaboration diagram for org.opensplice.dds.core.policy.ReaderLifespan:
Collaboration graph

Public Member Functions

Duration getDuration ()
 
ServiceEnvironment getEnvironment ()
 
ReaderLifespan withDuration (Duration duration)
 Copy this policy and override the value of the property. More...
 
ReaderLifespan withDuration (long duration, TimeUnit unit)
 Copy this policy and override the value of the property. More...
 

Detailed Description

This org.omg.dds.core.policy.QosPolicy is similar to the org.omg.dds.core.policy.Lifespan (applicable to org.omg.dds.topic.Topic and org.omg.dds.pub.DataWriter), but limited to the DataReader on which the policy is applied.

The data is automatically removed from the DataReader if it has not been taken yet after the lifespan duration expires. The duration of the ReaderLifespan is added to the insertion time of the data in the DataReader to determine the expiry time.

When both the ReaderLifespan and a DataWriter Lifespan are applied to the same data, only the earliest expiry time is taken into account. By default, the ReaderLifespan is not used. The duration is set to org.omg.dds.core.Duration#infiniteDuration(org.omg.dds.core.ServiceEnvironment)

This policy is applicable to a DataReader only, and is mutable even when the DataReader is already enabled. If modified, the new setting will only be applied to samples that are received after the modification took place.

See also
org.omg.dds.core.policy.Lifespan

Definition at line 49 of file ReaderLifespan.java.

Member Function Documentation

◆ getDuration()

Duration org.opensplice.dds.core.policy.ReaderLifespan.getDuration ( )
Returns
The duration of this ReaderLifespan.

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

◆ 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.

◆ withDuration() [1/2]

ReaderLifespan org.opensplice.dds.core.policy.ReaderLifespan.withDuration ( Duration  duration)

Copy this policy and override the value of the property.

Parameters
durationThe duration after which data loses validity and is removed
Returns
a new ReaderLifespan policy

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

◆ withDuration() [2/2]

ReaderLifespan org.opensplice.dds.core.policy.ReaderLifespan.withDuration ( long  duration,
TimeUnit  unit 
)

Copy this policy and override the value of the property.

Parameters
durationThe duration after which data loses validity and is removed
unitThe TimeUnit which the period describes (i.e. TimeUnit.SECONDS or TimeUnit.MILLISECONDS)
Returns
a new ReaderLifespan policy

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


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