-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMasterServerClientInterface.java
More file actions
38 lines (33 loc) · 1.01 KB
/
MasterServerClientInterface.java
File metadata and controls
38 lines (33 loc) · 1.01 KB
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
import java.io.FileNotFoundException;
import java.io.IOException;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.HashMap;
public interface MasterServerClientInterface extends Remote {
/**
* Read file from server
*
* @param fileName
* @return the addresses of of its different replicas
* @throws FileNotFoundException
* @throws IOException
* @throws RemoteException
*/
public ReplicaLoc[] read(String fileName) throws FileNotFoundException,
IOException, RemoteException;
/**
* Start a new write transaction
*
* @param fileName
* @return the requiref info
* @throws RemoteException
* @throws IOException
* @throws NotBoundException
*/
public WriteMsg write(FileContent data) throws RemoteException,
IOException, NotBoundException;
public HashMap<Integer, ReplicaLoc> getReplicaPaths()
throws RemoteException;
public void notify(int readack, String fileName) throws RemoteException;
}