1/*2 * Licensed to the Apache Software Foundation (ASF) under one3 * or more contributor license agreements. See the NOTICE file4 * distributed with this work for additional information5 * regarding copyright ownership. The ASF licenses this file6 * to you under the Apache License, Version 2.0 (the7 * "License"); you may not use this file except in compliance8 * with the License. You may obtain a copy of the License at9 *10 * http://www.apache.org/licenses/LICENSE-2.011 *12 * Unless required by applicable law or agreed to in writing, software13 * distributed under the License is distributed on an "AS IS" BASIS,14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15 * See the License for the specific language governing permissions and16 * limitations under the License.17 */18package org.apache.hadoop.chukwa.datacollection.agent.rest;
1920import javax.xml.bind.annotation.XmlAccessType;
21import javax.xml.bind.annotation.XmlAccessorType;
22import javax.xml.bind.annotation.XmlAttribute;
23import javax.xml.bind.annotation.XmlRootElement;
2425 @XmlRootElement
26 @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
27publicclassAdaptorAveragedRate {
28privatedouble rate;
29privatelong unit;
3031publicAdaptorAveragedRate() {
32 rate = 0;
33 unit = 0;
34 }
3536publicAdaptorAveragedRate(long unit, double rate) {
37this.unit = unit;
38this.rate = rate;
39 }
4041 @XmlAttribute
42publicdouble getRate() {
43return rate;
44 }
4546publicvoid setRate(double rate) {
47this.rate = rate;
48 }
4950 @XmlAttribute
51publiclong getIntervalInSeconds() {
52return unit;
53 }
5455publicvoid setIntervalInSeconds(long unit) {
56this.unit = unit;
57 }
58 }