blob: a17fbf1e2626afb43b630f2daa0387feb234bf87 (
plain) (
blame)
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
|
package derms;
import derms.frontend.FEInterface;
import java.io.IOException;
public class ReplicaRunner {
public static void main(String[] args) {
if (args.length != 1) {
System.err.println("Usage: ReplicaManagerRunner <replica_id>");
System.exit(1);
}
int replicaId = Integer.parseInt(args[0]);
System.out.println("Starting ReplicaManager for Replica " + replicaId);
try {
FEInterface frontEnd = new FE(); // Assume FE implements FEInterface
ReplicaManager replicaManager = new ReplicaManager(replicaId, frontEnd);
// Simulate receiving and handling client requests
// Add logic to listen for client requests and forward them to replicaManager
} catch (IOException e) {
System.err.println("Failed to start ReplicaManager: " + e.getMessage());
e.printStackTrace();
}
}
}
|