feature: fail over from index
This commit is contained in:
@@ -25,11 +25,18 @@ import java.net.InetSocketAddress;
|
||||
public class TrackerServer {
|
||||
protected InetSocketAddress inetSockAddr;
|
||||
|
||||
protected int index;
|
||||
|
||||
|
||||
public TrackerServer(InetSocketAddress inetSockAddr) throws IOException {
|
||||
this.inetSockAddr = inetSockAddr;
|
||||
}
|
||||
|
||||
public TrackerServer(InetSocketAddress inetSockAddr, int index) {
|
||||
this.inetSockAddr = inetSockAddr;
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
public Connection getConnection() throws MyException, IOException {
|
||||
Connection connection;
|
||||
if (ClientGlobal.g_connection_pool_enabled) {
|
||||
@@ -48,4 +55,11 @@ public class TrackerServer {
|
||||
return this.inetSockAddr;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user