public interface Durability extends QosPolicy.ForTopic, QosPolicy.ForDataReader, QosPolicy.ForDataWriter, RequestedOffered<Durability>
Topic
, DataReader
, DataWriter
RxO: Yes
Changeable: No
The decoupling between DataReader
and DataWriter
offered
by the Publish/Subscribe paradigm allows an application to write data even
if there are no current readers on the network. Moreover, a DataReader
that joins the network after some data has been written could potentially
be interested in accessing the most current values of the data as well as
potentially some history. This QoS policy controls whether the Service
will actually make data available to late-joining readers. Note that
although related, this does not strictly control what data the Service
will maintain internally. That is, the Service may choose to maintain some
data for its own purposes (e.g., flow control) and yet not make it
available to late-joining readers if the Durability
is
set to Durability.Kind.VOLATILE
.
The value offered is considered compatible with the value requested if and
only if the inequality offered kind >= requested kind evaluates to true.
For the purposes of this inequality, the values of
Durability.Kind
are considered ordered such that
VOLATILE < TRANSIENT_LOCAL < TRANSIENT < PERSISTENT.
For the purpose of implementing the Durability.Kind
TRANSIENT or PERSISTENT, the service behaves "as if" for each Topic
that has TRANSIENT or PERSISTENT DURABILITY kind there was a corresponding
"built-in" DataReader
and DataWriter
configured to have
the same DURABILITY kind. In other words, it is "as if" somewhere in the
system (possibly on a remote node) there was a "built-in durability
DataReader" that subscribed to that Topic and a "built-in durability
DataWriter" that published that Topic as needed for the new subscribers
that join the system.
For each Topic, the built-in fictitious "persistence service" DataReader
and DataWriter has its QoS configured from the Topic QoS of the
corresponding Topic. In other words, it is "as-if" the service first did
DomainParticipant.findTopic(String, org.omg.dds.core.Duration)
to
access the Topic, and then used the QoS from the Topic to configure the
fictitious built-in entities.
A consequence of this model is that the transient or persistence service
can be configured by means of setting the proper QoS on the Topic.
For a given Topic, the usual request/offered semantics apply to the
matching between any DataWriter in the system that writes the Topic and
the built-in transient/persistent DataReader for that Topic; similarly for
the built-in transient/persistent DataWriter for a Topic and any
DataReader for the Topic. As a consequence, a DataWriter that has an
incompatible QoS with respect to what the Topic specified will not send
its data to the transient/persistent service, and a DataReader that has an
incompatible QoS with respect to the specified in the Topic will not get
data from it.
Incompatibilities between local DataReader/DataWriter entities and the
corresponding fictitious "built-in transient/persistent entities" cause
the RequestedIncompatibleQosStatus
/
OfferedIncompatibleQosStatus
to change and the corresponding
Listener invocations and/or signaling of Condition
and
WaitSet
objects as they would with non-fictitious entities.
The setting of the serviceCleanupDelay controls when the TRANSIENT or
PERSISTENT service is able to remove all information regarding a data
instances. Information on a data instances is maintained until the
following conditions are met:
InstanceState.NOT_ALIVE_DISPOSED
),DataWriter
entities writing the
instance, that is, all existing writers either unregister the
instance (call
DataWriter.unregisterInstance(org.omg.dds.core.InstanceHandle)
)
or lose their liveliness,Modifier and Type | Interface and Description |
---|---|
static class |
Durability.Kind |
QosPolicy.ForDataReader, QosPolicy.ForDataWriter, QosPolicy.ForDomainParticipant, QosPolicy.ForDomainParticipantFactory, QosPolicy.ForPublisher, QosPolicy.ForSubscriber, QosPolicy.ForTopic
Modifier and Type | Method and Description |
---|---|
Durability.Kind |
getKind() |
Durability |
withKind(Durability.Kind kind)
Copy this policy and override the value of the property.
|
Durability |
withPersitent() |
Durability |
withTransient() |
Durability |
withTransientLocal() |
Durability |
withVolatile() |
getEnvironment
requestedOfferedContract
compareTo
Durability.Kind getKind()
Durability withKind(Durability.Kind kind)
Durability withVolatile()
Durability withTransientLocal()
Durability withTransient()
Durability withPersitent()
Copyright © 2014. All rights reserved.