Return to DDS Quality of Service
The OWNERSHIP policy controls whether the Service allows multiple DataWriter
objects to update the same instance (identified by Topic
+ key) of a data-object.
There are two kind
s of OWNERSHIP selected by the setting of the kind
: SHARED and EXCLUSIVE.
This setting indicates that the Service does not enforce unique ownership for each instance. In this case, multiple writers can update the same data-object instance. The subscriber to the Topic
will be able to access modifications from all DataWriter
objects, subject to the settings of other QoS that may filter particular samples (e.g., the TIME_BASED_FILTER or HISTORY QoS policy). In any case there is no “filtering” of modifications made based on the identity of the DataWriter
that causes the modification.
This setting indicates that each instance of a data-object can only be modified by one DataWriter
. In other words, at any point in time a single DataWriter
“owns” each instance and is the only one whose modifications will be visible to the DataReader
objects. The owner is determined by selecting the DataWriter
with the highest value of the strength
26 that is both “alive” as defined by the LIVELINESS QoS policy and has not violated its DEADLINE contract with regards to the data-instance. Ownership can therefore change as a result of (a) a DataWriter
in the system with a higher value of the strength
that modifies the instance, (b) a change in the strength
value of the DataWriter
that owns the instance, © a change in the liveliness of the
DataWriter
that owns the instance, and (d) a deadline with regards to the instance that is missed by the DataWriter
that owns the instance.
The behavior of the system is as if the determination was made independently by each DataReader
. Each DataReader
may
detect the change of ownership at a different time. It is not a requirement that at a particular point in time all the DataReader
objects for that Topic
have a consistent picture of who owns each instance.
It is also not a requirement that the DataWriter
objects are aware of 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.
The requirements are chosen to (a) preserve the decoupling of publishers and subscriber, and (b) allow the policy to be implemented efficiently.
It is possible that multiple DataWriter
objects with the same strength
modify the same instance. If this occurs the Service will pick one of the DataWriter
objects as the “owner.” It is not specified how the owner is selected. However, it is required that the policy used to select the owner is such that all DataReader
objects will make the same choice of the particular DataWriter
that is the owner. It is also required that the owner remains the same until there is a change in strength
, liveliness, the owner misses a deadline on the instance, a new DataWriter
with higher strength
modifies the instance, or another DataWriter
with the same strength
that is deemed by the Service to be the new owner modifies 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 set by the higher-strength
DataWriter
.
The value of the OWNERSHIP kind
offered must exactly match the one requested or else they are considered
incompatible.
Source: DDS 1.4 Spec