All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jeesuite.filesystem.sdk.fdfs.TrackerServer Maven / Gradle / Ivy

There is a newer version: 1.3.6
Show newest version
package com.jeesuite.filesystem.sdk.fdfs;

import java.net.InetSocketAddress;

/**
 * @author siuming
 */
public class TrackerServer {

    private String host;
    private int port;
    private int weight;

    /**
     * @param host
     * @param port
     */
    public TrackerServer(String host, int port) {
        this(host, port, -1);
    }

    /**
     * @param host
     * @param port
     * @param weight
     */
    public TrackerServer(String host, int port, int weight) {
        this.host = host;
        this.port = port;
        this.weight = weight;
    }

    /**
     * @return
     */
    public String host() {
        return host;
    }

    /**
     * @return
     */
    public int port() {
        return port;
    }

    /**
     * @return
     */
    public int weight() {
        return weight;
    }

    /**
     * @return
     */
    public InetSocketAddress toInetAddress() {
        return new InetSocketAddress(host, port);
    }

    @Override
    public String toString() {
        return "TrackerServer{" +
                "host='" + host + '\'' +
                ", port=" + port +
                ", weight=" + weight +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy