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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
package com.orbekk.same;
import java.util.Map;
import java.util.HashMap;
import com.orbekk.paxos.PaxosService;
import com.orbekk.same.Services.Directory;
import com.orbekk.same.Services.Master;
import com.orbekk.same.Services.Paxos;
/**
* This class is used in test.
*/
public class TestConnectionManager implements ConnectionManager {
public Map<String, ClientService> clientMap =
new HashMap<String, ClientService>();
public Map<String, MasterService> masterMap =
new HashMap<String, MasterService>();
public Map<String, PaxosService> paxosMap =
new HashMap<String, PaxosService>();
public Map<String, Services.Directory> directoryMap =
new HashMap<String, Services.Directory>();
public Map<String, Services.Master> masterMap0 =
new HashMap<String, Services.Master>();
public Map<String, Services.Client> clientMap0 =
new HashMap<String, Services.Client>();
public Map<String, Services.Paxos> paxosMap0 =
new HashMap<String, Services.Paxos>();
public TestConnectionManager() {
}
@Override
public ClientService getClient(String url) {
return clientMap.get(url);
}
@Override
public MasterService getMaster(String url) {
return masterMap.get(url);
}
@Override
public PaxosService getPaxos(String url) {
return paxosMap.get(url);
}
@Override
public Directory getDirectory(String location) {
return directoryMap.get(location);
}
@Override
public Master getMaster0(String location) {
return masterMap0.get(location);
}
@Override
public Services.Client getClient0(String location) {
return clientMap0.get(location);
}
@Override
public Services.Paxos getPaxos0(String location) {
return paxosMap0.get(location);
}
}
|