8000 Some small configuration changes · rpytel1/distributed-algorithms@f3d7d7e · GitHub
[go: up one dir, main page]

Skip to content

Commit f3d7d7e

Browse files
author
rpytel1
committed
Some small configuration changes
1 parent 0a9fa28 commit f3d7d7e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Assignment3/src/assignment3/server/Client1.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void main(String[] args) throws AlreadyBoundException, NotBoundExc
3232
links = new HashMap<Integer, List<Link>>();
3333
initializeEdges();
3434
// "clients" files contain the name of the remote processes used
35-
BufferedReader br = new BufferedReader(new FileReader("tests/nodes2.txt"));
35+
BufferedReader br = new BufferedReader(new FileReader("tests/nodes1.txt"));
3636
String line = br.readLine();
3737
numProc = Integer.parseInt(line);
3838
localProc = 0;
@@ -52,7 +52,7 @@ public static void main(String[] args) throws AlreadyBoundException, NotBoundExc
5252
boolean success = false;
5353
while (!success){
5454
try{
55-
registry.bind("//145.94.233.58:"+Constant.RMI_PORT+"/"+split_line[0], new Node(i, new PriorityQueue<Link>(links.get(i))));
55+
registry.bind("//145.94.234.109:"+Constant.RMI_PORT+"/"+split_line[0], new Node(i, new PriorityQueue<Link>(links.get(i))));
5656
success = true;
5757
}
5858
catch (RemoteException e) {
@@ -65,15 +65,12 @@ public static void main(String[] args) throws AlreadyBoundException, NotBoundExc
6565
i++;
6666
}
6767
br.close();
68-
System.out.println("Press enter to continue");
69-
Scanner scan = new Scanner(System.in);
70-
scan.nextLine();
7168
setRegistry();
7269
System.out.println("Client 1 started");
7370
}
7471

7572
public static void initializeEdges() throws IOException{
76-
BufferedReader br = new BufferedReader(new FileReader("tests/edges2.txt"));
73+
BufferedReader br = new BufferedReader(new FileReader("tests/edges1.txt"));
7774
String line;
7875
int node1;
7976
int node2;
@@ -124,10 +121,7 @@ public static void setRegistry() throws NotBoundException, NumberFormatException
124121
RemoteProcess p = new RemoteProcess(RMI_IDS[localIDS.get(i)]);
125122
myThreads[i] = new Thread(p); // and a new thread is created
126123
}
127-
128-
System.out.println("Press enter to continue");
129-
Scanner scan = new Scanner(System.in);
130-
scan.nextLine();
124+
131125
myThreads[0].start();
132126
myThreads[1].start();
133127
}

0 commit comments

Comments
 (0)
0