
org.joyqueue.toolkit.network.Line Maven / Gradle / Ivy
/**
* Copyright 2019 The JoyQueue Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.joyqueue.toolkit.network;
/**
* 专线
* Created by hexiaofeng on 16-7-6.
*/
public class Line {
// 机房1
private T from;
// 机房2
private T to;
// 丢包率
private double loss;
// 延迟率
private double rtt;
// 入口流量占比
private double in;
// 出口流量占比
private double out;
public Line() {
}
public Line(T from, T to) {
this.from = from;
this.to = to;
}
public Line(T from, T to, double loss, double rtt, double in, double out) {
this.from = from;
this.to = to;
this.loss = loss;
this.rtt = rtt;
this.in = in;
this.out = out;
}
public T getFrom() {
return from;
}
public void setFrom(T from) {
this.from = from;
}
public T getTo() {
return to;
}
public void setTo(T to) {
this.to = to;
}
public double getLoss() {
return loss;
}
public void setLoss(double loss) {
this.loss = loss;
}
public double getRtt() {
return rtt;
}
public void setRtt(double rtt) {
this.rtt = rtt;
}
public double getIn() {
return in;
}
public void setIn(double in) {
this.in = in;
}
public double getOut() {
return out;
}
public void setOut(double out) {
this.out = out;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy