|
|
|
@ -95,6 +95,7 @@ public class HostQueue implements Balancer {
|
|
|
|
|
// parse the hostName and port from the file name
|
|
|
|
|
String filename = hostPath.getName();
|
|
|
|
|
int p = filename.lastIndexOf('.');
|
|
|
|
|
if (p < 0) throw new RuntimeException("hostPath name must contain a dot: " + filename);
|
|
|
|
|
this.hostName = filename.substring(0, p);
|
|
|
|
|
this.port = Integer.parseInt(filename.substring(p + 1));
|
|
|
|
|
init();
|
|
|
|
|