21 package org.opensplice.dds.core.policy;
23 import java.util.concurrent.TimeUnit;
33 private static final long serialVersionUID = 6465409872651281346L;
34 private final Duration autoPurgeNoWriterSamplesDelay;
35 private final Duration autoPurgeDisposedSamplesDelay;
36 private final boolean autoPurgeDisposeAll;
37 private Kind invalidSampleVisibility;
41 this.autoPurgeNoWriterSamplesDelay = environment.
getSPI()
43 this.autoPurgeDisposedSamplesDelay = environment.
getSPI()
45 this.autoPurgeDisposeAll =
false;
46 this.invalidSampleVisibility =
Kind.MINIMUM;
50 Duration autoPurgeNoWriterSamplesDelay,
51 Duration autoPurgeDisposedSamplesDelay,
52 boolean autoPurgeDisposeAll,
53 Kind invalidSampleVisibility) {
56 if (autoPurgeNoWriterSamplesDelay == null) {
58 "Supplied invalid autoPurgeNoWriterSamplesDelay duration.");
60 if (autoPurgeDisposedSamplesDelay == null) {
62 "Supplied invalid autoPurgeDisposedSamplesDelay duration.");
64 if (invalidSampleVisibility == null) {
66 "Supplied invalid invalidSampleVisibility.");
68 this.autoPurgeNoWriterSamplesDelay = autoPurgeNoWriterSamplesDelay;
69 this.autoPurgeDisposedSamplesDelay = autoPurgeDisposedSamplesDelay;
70 this.autoPurgeDisposeAll = autoPurgeDisposeAll;
71 this.invalidSampleVisibility = invalidSampleVisibility;
76 return this.autoPurgeNoWriterSamplesDelay;
81 return this.autoPurgeDisposedSamplesDelay;
86 return this.autoPurgeDisposeAll;
91 return this.invalidSampleVisibility;
96 Duration autoPurgeNoWriterSamplesDelay) {
98 autoPurgeNoWriterSamplesDelay,
99 this.autoPurgeDisposedSamplesDelay,
100 this.autoPurgeDisposeAll,
101 this.invalidSampleVisibility);
106 long autoPurgeNoWriterSamplesDelay, TimeUnit unit) {
108 .getSPI().newDuration(autoPurgeNoWriterSamplesDelay, unit),
109 this.autoPurgeDisposedSamplesDelay,
110 this.autoPurgeDisposeAll,
111 this.invalidSampleVisibility);
116 Duration autoPurgeDisposedSamplesDelay) {
118 this.autoPurgeNoWriterSamplesDelay,
119 autoPurgeDisposedSamplesDelay,
120 this.autoPurgeDisposeAll,
121 this.invalidSampleVisibility);
127 this.autoPurgeNoWriterSamplesDelay,
128 this.autoPurgeDisposedSamplesDelay,
130 this.invalidSampleVisibility);
137 this.autoPurgeNoWriterSamplesDelay,
138 this.autoPurgeDisposedSamplesDelay,
139 this.autoPurgeDisposeAll,
145 long autoPurgeDisposedSamplesDelay, TimeUnit unit) {
149 this.autoPurgeDisposeAll,
150 this.invalidSampleVisibility);
165 if (this.autoPurgeDisposeAll != r.autoPurgeDisposeAll) {
168 if (this.invalidSampleVisibility != r.invalidSampleVisibility) {
171 if (!this.autoPurgeDisposedSamplesDelay
172 .
equals(r.autoPurgeDisposedSamplesDelay)) {
175 return this.autoPurgeNoWriterSamplesDelay
176 .equals(r.autoPurgeNoWriterSamplesDelay);
181 final int prime = 31;
184 result = prime * result + (this.autoPurgeDisposeAll ? 1 : 0);
185 result = prime * result + this.autoPurgeDisposedSamplesDelay.hashCode();
187 return prime * result + this.autoPurgeNoWriterSamplesDelay.hashCode();
Specifies the behavior of the org.omg.dds.sub.DataReader with regards to the life cycle of the data i...
This class provides OpenSplice-specific extensions to the org.omg.dds.core.policy.ReaderDataLifecycle policy.
OsplServiceEnvironment environment
ReaderDataLifecycle withAutoPurgeNoWriterSamplesDelay(Duration autoPurgeNoWriterSamplesDelay)
Copy this policy and override the value of the property.
ReaderDataLifecycleImpl(OsplServiceEnvironment environment, Duration autoPurgeNoWriterSamplesDelay, Duration autoPurgeDisposedSamplesDelay, boolean autoPurgeDisposeAll, Kind invalidSampleVisibility)
org.opensplice.dds.core.policy.ReaderDataLifecycle withAutoPurgeDisposeAll()
boolean equals(Object other)
ReaderDataLifecycle withAutoPurgeDisposedSamplesDelay(Duration autoPurgeDisposedSamplesDelay)
Copy this policy and override the value of the property.
boolean getAutoPurgeDisposeAll()
Duration getAutoPurgeDisposedSamplesDelay()
ServiceProviderInterface getSPI()
This class is the abstract root for all the QoS policies.
Duration getAutoPurgeNoWriterSamplesDelay()
ReaderDataLifecycle withAutoPurgeDisposedSamplesDelay(long autoPurgeDisposedSamplesDelay, TimeUnit unit)
Copy this policy and override the value of the property.
ReaderDataLifecycleImpl(OsplServiceEnvironment environment)
Duration newDuration(long duration, TimeUnit unit)
Construct a org.omg.dds.core.Duration of the given magnitude.
A span of elapsed time expressed with nanosecond precision.
Class<? extends QosPolicy > getPolicyClass()
ReaderDataLifecycle withAutoPurgeNoWriterSamplesDelay(long autoPurgeNoWriterSamplesDelay, TimeUnit unit)
Copy this policy and override the value of the property.
Kind getInvalidSampleInvisibility()
org.opensplice.dds.core.policy.ReaderDataLifecycle withInvalidSampleInvisibility(Kind kind)
Duration infiniteDuration()