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

This QosPolicy specifies whether a DataWriter exclusively may own an instance. More...

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

Classes

enum  Kind
 

Public Member Functions

ServiceEnvironment getEnvironment ()
 
Kind getKind ()
 
Comparable< SELF > requestedOfferedContract ()
 Use the object returned by this method to evaluate the Request/Offer relationship with another instance of this policy. More...
 
Ownership withExclusive ()
 
Ownership withKind (Kind kind)
 Copy this policy and override the value of the property. More...
 
Ownership withShared ()
 

Detailed Description

This QosPolicy specifies whether a DataWriter exclusively may own an instance.

In other words, whether multiple org.omg.dds.pub.DataWriter objects can write the same instance at the same time. The org.omg.dds.sub.DataReader objects will only read the modifications on an instance from the DataWriter owning the instance. Exclusive ownership is on an instance-by-instance basis. That is, a Subscriber can receive values written by a lower strength DataWriter as long as they affect instances whose values have not been written or registered by a higher-strength DataWriter. After enabling of the concerning Entity, this QosPolicy cannot be changed any more.

Concerns: org.omg.dds.topic.Topic, org.omg.dds.sub.DataReader, org.omg.dds.pub.DataWriter

RxO: Yes

Changeable: No

Exclusive Ownership The DataWriter with the highest OwnershipStrengthQosPolicy value and being alive (depending on the LivelinessQosPolicy) and which has not violated its DeadlineQosPolicy contract with respect to the instance, will be considered the owner of the instance. Consequently, the ownership can change as a result of:

  • a DataWriter in the system with a higher value of the OwnershipStrengthQosPolicy modifies the instance
  • a change in the OwnershipStrengthQosPolicy value (becomes less) of the DataWriter owning the instance
  • a change in the liveliness (becomes not alive) of the DataWriter owning the instance
  • a deadline with respect to the instance that is missed by the DataWriter that owns the instance

Timeline Each DataReader may detect the change of ownership at a different time. In other words, at a particular point in time, the DataReader objects do not have a consistent picture of who owns each instance for that Topic. Outside this grey area in time all DataReader objects will consider the same DataWriter to be the owner. If multiple DataWriter objects with the same OwnershipStrengthQosPolicy modify the same instance, all DataReader objects will make the same choice of the particular DataWriter that is the owner. The DataReader is also notified of this via a status change that is accessible by means of the Listener or Condition mechanisms.

Ownership of an Instance DataWriter objects are not aware whether they own a particular instance. There is no error or notification given to a DataWriter that modifies an instance it does not currently own.

See also
OwnershipStrength

Definition at line 63 of file Ownership.java.

Member Function Documentation

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

◆ getKind()

Kind org.omg.dds.core.policy.Ownership.getKind ( )
Returns
the kind

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

◆ requestedOfferedContract()

Comparable<SELF> org.omg.dds.core.policy.RequestedOffered< SELF >.requestedOfferedContract ( )
inherited

Use the object returned by this method to evaluate the Request/Offer relationship with another instance of this policy.

If this policy is offered by a org.omg.dds.pub.DataWriter (or org.omg.dds.pub.Publisher), any other policy evaluated as less than or equal to it by the Comparable may be compatibly requested by a org.omg.dds.sub.DataReader (or org.omg.dds.sub.Subscriber). Similarly, if this policy is requested, any other policy that is greater than or equal to it may be compatibly offered.

Returns
a Comparable object capable of evaluating the Request/Offer relationship between two instances of the QoS policy identified by the type parameter SELF.

◆ withExclusive()

Ownership org.omg.dds.core.policy.Ownership.withExclusive ( )
Returns
exclusive Ownership policy

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

◆ withKind()

Ownership org.omg.dds.core.policy.Ownership.withKind ( Kind  kind)

Copy this policy and override the value of the property.

Parameters
kindSpecifies whether a DataWriter exclusively owns an instance.
Returns
a new Ownership policy

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

◆ withShared()

Ownership org.omg.dds.core.policy.Ownership.withShared ( )
Returns
shared Ownership policy

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


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