OWNERSHIP
-
The OWNERSHIP policy controls whether more than one Data Writer is able to write samples for the same data-object instance. Ownership can be
EXCLUSIVE
or
SHARED
. Below is the IDL related to the Ownership QoS policy:
enum OwnershipQosPolicyKind {
SHARED_OWNERSHIP_QOS,
EXCLUSIVE_OWNERSHIP_QOS
};
struct OwnershipQosPolicy {
OwnershipQosPolicyKind kind;
};
-
If the
kind
member is set to
SHARED_OWNERSHIP_QOS
, more than one Data Writer is allowed to update the same data-object instance. If the
kind
member is set to
EXCLUSIVE_OWNERSHIP_QOS
, only one Data Writer is allowed to update a given data-object instance (i.e., the Data Writer is considered to be the
owner
of the instance) and associated Data Readers will only see samples written by that Data Writer. The owner of the instance is determined by value of the OWNERSHIP_STRENGTH policy; the data writer with the highest value of strength is considered the owner of the data-object instance. Other factors may also influence ownership, such as whether the data writer with the highest strength is “alive” (as defined by the LIVELINESS policy) and has not violated its offered publication deadline constraints (as defined by the DEADLINE policy).