21 package org.opensplice.dds.core.policy;
28 private static final long serialVersionUID = 918915709322634268L;
29 private final int maxSamples;
30 private final int maxInstances;
31 private final int maxSamplesPerInstance;
36 this.maxInstances = -1;
37 this.maxSamplesPerInstance = -1;
41 int maxSamples,
int maxInstances,
int maxSamplesPerInstance) {
43 this.maxSamples = maxSamples;
44 this.maxInstances = maxInstances;
45 this.maxSamplesPerInstance = maxSamplesPerInstance;
50 return this.maxSamples;
55 return this.maxInstances;
60 return this.maxSamplesPerInstance;
66 this.maxInstances, this.maxSamplesPerInstance);
72 maxInstances, this.maxSamplesPerInstance);
78 this.maxInstances, maxSamplesPerInstance);
87 public boolean equals(Object other) {
93 if (this.maxInstances != r.maxInstances) {
96 if (this.maxSamples != r.maxSamples) {
99 return (this.maxSamplesPerInstance == r.maxSamplesPerInstance);
104 final int prime = 31;
107 result = prime * result + this.maxInstances;
108 result = prime * result + this.maxSamples;
110 return prime * result + this.maxSamplesPerInstance;
Class<? extends QosPolicy > getPolicyClass()
OsplServiceEnvironment environment
ResourceLimits withMaxInstances(int maxInstances)
Copy this policy and override the value of the property.
ResourceLimits withMaxSamplesPerInstance(int maxSamplesPerInstance)
Copy this policy and override the value of the property.
ResourceLimitsImpl(OsplServiceEnvironment environment)
int getMaxSamplesPerInstance()
ResourceLimits withMaxSamples(int maxSamples)
Copy this policy and override the value of the property.
This class is the abstract root for all the QoS policies.
ResourceLimitsImpl(OsplServiceEnvironment environment, int maxSamples, int maxInstances, int maxSamplesPerInstance)
boolean equals(Object other)
Specifies the resources that the Service can consume in order to meet the requested QoS...