-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMaster_run.java
More file actions
executable file
·51 lines (28 loc) · 929 Bytes
/
Master_run.java
File metadata and controls
executable file
·51 lines (28 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
public class Master_run {
static int SERVER_PORT = 4444;
public static void main(String[] args){
// create a master (server) instance
Master master = new Master(SERVER_PORT);
master.initialize_connection();
if (master.serverSocket == null) {
System.out.println("Master : connectivity is not established.");
} else {
System.out.println("Master : connectivity is established.");
// update with follower
master.sync_with_follower(5);
// update with drive
master.sync_with_cloud(10);
// end connection
// master.terminate_connection();
// try {
//
// Resources.create_metafile();
//
// } catch (IOException e) {
//
// System.out.println("Master : could not create metafile.");
//
// }
}
}
}