![]() |
OpenSplice Java 5 DCPS
v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
Determines the mechanism and parameters used by the application to determine whether an org.omg.dds.core.Entity is "active" (alive). More...
Classes | |
enum | Kind |
Public Member Functions | |
ServiceEnvironment | getEnvironment () |
Kind | getKind () |
Duration | getLeaseDuration () |
Comparable< SELF > | requestedOfferedContract () |
Use the object returned by this method to evaluate the Request/Offer relationship with another instance of this policy. More... | |
Liveliness | withAutomatic () |
Liveliness | withKind (Kind kind) |
Copy this policy and override the value of the property. More... | |
Liveliness | withLeaseDuration (Duration leaseDuration) |
Copy this policy and override the value of the property. More... | |
Liveliness | withLeaseDuration (long leaseDuration, TimeUnit unit) |
Copy this policy and override the value of the property. More... | |
Liveliness | withManualByParticipant () |
Liveliness | withManualByTopic () |
Determines the mechanism and parameters used by the application to determine whether an org.omg.dds.core.Entity is "active" (alive).
The "liveliness" status of an Entity is used to maintain instance ownership in combination with the setting of the org.omg.dds.core.policy.Ownership . The application is also informed via an Entity org.omg.dds.core.status.Status change when an Entity is no longer alive. The org.omg.dds.sub.DataReader requests that liveliness of the writers is maintained by the requested means and loss of liveliness is detected with delay not to exceed the leaseDuration. The org.omg.dds.pub.DataWriter commits to signaling its liveliness using the stated means at intervals not to exceed the leaseDuration. The default kind is Liveliness.Kind#AUTOMATIC and the default value of the leaseDuration is infinite.
Concerns: org.omg.dds.topic.Topic, org.omg.dds.sub.DataReader, org.omg.dds.pub.DataWriter
RxO: Yes
Changeable: No
This policy has several settings to support both data objects that are updated periodically as well as those that are changed sporadically. It also allows customizing for different application requirements in terms of the kinds of failures that will be detected by the liveliness mechanism.
The Kind#AUTOMATIC liveliness setting is most appropriate for applications that only need to detect failures at the process level, but not application-logic failures within a process. The Service takes responsibility for renewing the leases at the required rates and thus, as long as the local process where a org.omg.dds.domain.DomainParticipant is running and the link connecting it to remote participants remains connected, the entities within the DomainParticipant will be considered alive. This requires the lowest overhead.
The MANUAL settings (Kind#MANUAL_BY_PARTICIPANT, Kind#MANUAL_BY_TOPIC) require the application on the publishing side to periodically assert the liveliness before the lease expires to indicate the corresponding Entity is still alive. The action can be explicit by calling the assertLiveliness
operations ( org.omg.dds.pub.DataWriter#assertLiveliness(), org.omg.dds.domain.DomainParticipant#assertLiveliness()) or implicit by writing some data.
The two possible manual settings control the granularity at which the application must assert liveliness.
The value offered is considered compatible with the value requested if and only if the following conditions are met:
AUTOMATIC < MANUAL_BY_PARTICIPANT < MANUAL_BY_TOPIC
. Changes in LIVELINESS must be detected by the Service with a time granularity greater or equal to the leaseDuration. This ensures that the value of the org.omg.dds.core.status.LivelinessChangedStatus is updated at least once during each leaseDuration and the related Listeners and org.omg.dds.core.WaitSets are notified within a leaseDuration from the time the LIVELINESS changed.
Definition at line 102 of file Liveliness.java.
|
inherited |
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.
Kind org.omg.dds.core.policy.Liveliness.getKind | ( | ) |
Implemented in org.opensplice.dds.core.policy.LivelinessImpl.
Duration org.omg.dds.core.policy.Liveliness.getLeaseDuration | ( | ) |
Implemented in org.opensplice.dds.core.policy.LivelinessImpl.
|
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.
SELF
. Liveliness org.omg.dds.core.policy.Liveliness.withAutomatic | ( | ) |
Implemented in org.opensplice.dds.core.policy.LivelinessImpl.
Liveliness org.omg.dds.core.policy.Liveliness.withKind | ( | Kind | kind | ) |
Copy this policy and override the value of the property.
kind | Specifies the way the liveliness of an Entity is determined |
Implemented in org.opensplice.dds.core.policy.LivelinessImpl.
Liveliness org.omg.dds.core.policy.Liveliness.withLeaseDuration | ( | Duration | leaseDuration | ) |
Copy this policy and override the value of the property.
leaseDuration | Specifies the duration of the interval within which the liveliness must be determined. |
Implemented in org.opensplice.dds.core.policy.LivelinessImpl.
Liveliness org.omg.dds.core.policy.Liveliness.withLeaseDuration | ( | long | leaseDuration, |
TimeUnit | unit | ||
) |
Copy this policy and override the value of the property.
leaseDuration | Specifies a long leaseDuration for the interval within which the liveliness must be determined. |
unit | The TimeUnit which the duration describes (i.e. TimeUnit.SECONDS or TimeUnit.MILLISECONDS) |
Implemented in org.opensplice.dds.core.policy.LivelinessImpl.
Liveliness org.omg.dds.core.policy.Liveliness.withManualByParticipant | ( | ) |
Implemented in org.opensplice.dds.core.policy.LivelinessImpl.
Liveliness org.omg.dds.core.policy.Liveliness.withManualByTopic | ( | ) |
Implemented in org.opensplice.dds.core.policy.LivelinessImpl.