public interface ReaderDataLifecycle extends QosPolicy.ForDataReader
DataReader
with regards to the life
cycle of the data instances it manages.
Concerns: DataReader
RxO: N/A
Changeable: Yes
This policy controls the behavior of the DataReader with regards to the
lifecycle of the data instances it manages, that is, the data instance
that have been received and for which the DataReader maintains some
internal resources.
The DataReader internally maintains the samples that have not been taken
by the application, subject to the constraints imposed by other QoS
policies such as History
and
ResourceLimits
.
The DataReader also maintains information regarding the identity,
ViewState
and InstanceState
of data instances even after
all samples have been 'taken.' This is needed to properly compute the
states when future samples arrive.
Under normal circumstances the DataReader can only reclaim all resources
for instances for which there are no writers and for which all samples
have been 'taken.' The last sample the DataReader will have taken for that
instance will have an instance state of either
InstanceState.NOT_ALIVE_NO_WRITERS
or
InstanceState.NOT_ALIVE_DISPOSED
depending on whether the last
writer that had ownership of the instance disposed it or not. In the
absence of the READER_DATA_LIFECYCLE QoS this behavior could cause
problems if the application "forgets" to 'take' those samples. The
'untaken' samples will prevent the DataReader from reclaiming the
resources and they would remain in the DataReader indefinitely.
The autoPurgeNoWriterSamplesDelay defines the maximum duration for which
the DataReader will maintain information regarding an instance once its
instance state becomes NOT_ALIVE_NO_WRITERS. After this time elapses, the
DataReader will purge all internal information regarding the instance; any
untaken samples will also be lost.
The autoPurgeDisposedSamplesDelay defines the maximum duration for which
the DataReader will maintain samples for an instance once its instance
state becomes NOT_ALIVE_DISPOSED. After this time elapses, the DataReader
will purge all samples for the instance.History
,
ResourceLimits
QosPolicy.ForDataReader, QosPolicy.ForDataWriter, QosPolicy.ForDomainParticipant, QosPolicy.ForDomainParticipantFactory, QosPolicy.ForPublisher, QosPolicy.ForSubscriber, QosPolicy.ForTopic
Modifier and Type | Method and Description |
---|---|
Duration |
getAutoPurgeDisposedSamplesDelay() |
Duration |
getAutoPurgeNoWriterSamplesDelay() |
ReaderDataLifecycle |
withAutoPurgeDisposedSamplesDelay(Duration autoPurgeDisposedSamplesDelay)
Copy this policy and override the value of the property.
|
ReaderDataLifecycle |
withAutoPurgeDisposedSamplesDelay(long autoPurgeDisposedSamplesDelay,
TimeUnit unit)
Copy this policy and override the value of the property.
|
ReaderDataLifecycle |
withAutoPurgeNoWriterSamplesDelay(Duration autoPurgeNoWriterSamplesDelay)
Copy this policy and override the value of the property.
|
ReaderDataLifecycle |
withAutoPurgeNoWriterSamplesDelay(long autoPurgeNoWriterSamplesDelay,
TimeUnit unit)
Copy this policy and override the value of the property.
|
getEnvironment
Duration getAutoPurgeNoWriterSamplesDelay()
Duration getAutoPurgeDisposedSamplesDelay()
ReaderDataLifecycle withAutoPurgeNoWriterSamplesDelay(Duration autoPurgeNoWriterSamplesDelay)
ReaderDataLifecycle withAutoPurgeNoWriterSamplesDelay(long autoPurgeNoWriterSamplesDelay, TimeUnit unit)
ReaderDataLifecycle withAutoPurgeDisposedSamplesDelay(Duration autoPurgeDisposedSamplesDelay)
ReaderDataLifecycle withAutoPurgeDisposedSamplesDelay(long autoPurgeDisposedSamplesDelay, TimeUnit unit)
Copyright © 2014. All rights reserved.