public interface ResourceLimits extends QosPolicy.ForTopic, QosPolicy.ForDataReader, QosPolicy.ForDataWriter
Topic
, DataReader
, DataWriter
RxO: No
Changeable: No
This policy controls the resources that the Service can use in order to
meet the requirements imposed by the application and other QoS settings.
If the DataWriter objects are communicating samples faster than they are
ultimately taken by the DataReader objects, the middleware will eventually
hit against some of the QoS-imposed resource limits. Note that this may
occur when just a single DataReader cannot keep up with its corresponding
DataWriter. The behavior in this case depends on the setting for the
Reliability
. If reliability is
Reliability.Kind.BEST_EFFORT
, then the Service is allowed
to drop samples. If the reliability is
Reliability.Kind.RELIABLE
, the Service will block the
DataWriter or discard the sample at the DataReader in order not to lose
existing samples (so that the sample can be resent at a later time).
The constant LENGTH_UNLIMITED
may be used to indicate the absence
of a particular limit. For example setting maxSamplesPerInstance to
LENGH_UNLIMITED will cause the middleware to not enforce this particular
limit.
The setting of RESOURCE_LIMITS maxSamples must be consistent with the
maxSamplesPerInstance. For these two values to be consistent they must
verify that "max_samples >= max_samples_per_instance."
The setting of RESOURCE_LIMITS maxSamplesPerInstance must be consistent
with the HISTORY depth. For these two QoS to be consistent, they must
verify that "depth <= maxSamplesPerInstance."
An attempt to set this policy to inconsistent values when an entity is
created or via a setQos
operation will cause the operation to
fail.History
,
Reliability
QosPolicy.ForDataReader, QosPolicy.ForDataWriter, QosPolicy.ForDomainParticipant, QosPolicy.ForDomainParticipantFactory, QosPolicy.ForPublisher, QosPolicy.ForSubscriber, QosPolicy.ForTopic
Modifier and Type | Field and Description |
---|---|
static int |
LENGTH_UNLIMITED |
Modifier and Type | Method and Description |
---|---|
int |
getMaxInstances() |
int |
getMaxSamples() |
int |
getMaxSamplesPerInstance() |
ResourceLimits |
withMaxInstances(int maxInstances)
Copy this policy and override the value of the property.
|
ResourceLimits |
withMaxSamples(int maxSamples)
Copy this policy and override the value of the property.
|
ResourceLimits |
withMaxSamplesPerInstance(int maxSamplesPerInstance)
Copy this policy and override the value of the property.
|
getEnvironment
static final int LENGTH_UNLIMITED
int getMaxSamples()
int getMaxInstances()
int getMaxSamplesPerInstance()
ResourceLimits withMaxSamples(int maxSamples)
ResourceLimits withMaxInstances(int maxInstances)
ResourceLimits withMaxSamplesPerInstance(int maxSamplesPerInstance)
Copyright © 2014. All rights reserved.