OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
TransportPriorityImpl.java
Go to the documentation of this file.
1 /*
2  * Vortex OpenSplice
3  *
4  * This software and documentation are Copyright 2006 to 2024 ADLINK
5  * Technology Limited, its affiliated companies and licensors. All rights
6  * reserved.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 package org.opensplice.dds.core.policy;
22 
26 
27 public class TransportPriorityImpl extends QosPolicyImpl implements
29  private static final long serialVersionUID = -2681488718301095677L;
30  private final int value;
31 
33  super(environment);
34  this.value = 0;
35  }
36 
38  super(environment);
39  this.value = value;
40  }
41 
42  @Override
43  public int getValue() {
44  return this.value;
45  }
46 
47  @Override
48  public TransportPriority withValue(int value) {
49  return new TransportPriorityImpl(this.environment, value);
50  }
51 
52  @Override
53  public Class<? extends QosPolicy> getPolicyClass() {
54  return TransportPriority.class;
55  }
56 
57  @Override
58  public boolean equals(Object other) {
59  if (!(other instanceof TransportPriorityImpl)) {
60  return false;
61  }
62  return (this.value == (((TransportPriorityImpl) other).value));
63  }
64 
65  @Override
66  public int hashCode() {
67  return 31 * 17 + this.value;
68  }
69 
70 }
TransportPriority withValue(int value)
Copy this policy and override the value of the property.
TransportPriorityImpl(OsplServiceEnvironment environment)
This policy is a hint to the infrastructure as to how to set the priority of the underlying transport...
This class is the abstract root for all the QoS policies.
Definition: QosPolicy.java:118
TransportPriorityImpl(OsplServiceEnvironment environment, int value)