Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correction of some bugs and performance enhancement.
[jaceP2P.git] / src / jaceP2P / JaceSuperNodeInterface.java
1 package jaceP2P;
2
3 import java.rmi.Remote;
4 import java.rmi.RemoteException;
5 import java.util.ArrayList;
6
7 import and.Mapping.Algo;
8 import and.Mapping.GNode;
9
10 public interface JaceSuperNodeInterface extends Remote {
11 //      public void workerRegistering(JaceInterface workerStub, String workerIP,
12 //                      String workerName, int port) throws RemoteException;
13
14         public void workerRegistering(JaceInterface workerStub, String workerIP,
15                         String workerName, int port, GNode g) throws RemoteException;
16
17         public int getSuperNodeBeat() throws RemoteException;
18
19         public void beating(JaceInterface stub) throws RemoteException;
20
21         public void beating(boolean bool) throws RemoteException;
22
23 //      public Register getRegisterSpawner(String spawnerIP, int nbTasks)
24 //                      throws RemoteException;
25
26         public Register getRegisterSpawner(String spawnerIP, int nbTasks, Task t,
27                         int nbNodes, int algo, double param) throws RemoteException;
28
29 //      public Register reserveLocalNodes(int nb) throws RemoteException;
30
31 //      public Node getNewNode(String spawnerIP) throws RemoteException;
32         
33         public Node getNewNode( String _spawnerIP, int _rank ) throws RemoteException ;
34         
35         public Node getNewNode( String spawnerIP, GNode _deadNode ) throws RemoteException;
36
37         public ArrayList<Object> sendStub(String IP, int port, JaceSuperNodeInterface stub)
38                         throws RemoteException;
39
40         public void updateCountNode(String IP, int nb) throws RemoteException;
41
42         public void sendSurplus(ArrayList<Node> newVector, ArrayList<GNode> _gnodes) throws RemoteException;
43
44         public void removeSuperNode(SuperNodeData d) throws RemoteException;
45
46         public void setToken() throws RemoteException;
47
48         public void updateHeart(JaceSuperNodeInterface stub) throws RemoteException;
49         
50         /** ! **/
51         public void addGNode( GNode _g ) throws RemoteException ;
52         
53 //      public void removeGNode( GNode _g ) throws RemoteException ;
54         
55         public GNode delGNodeFromList( Node _n, int _mode, String _spawnerIp ) throws RemoteException ;
56
57         public boolean blockForMapping() throws RemoteException ;
58         
59         public void setMapping( Algo al ) throws RemoteException ;
60
61         public void updateMappedNode(GNode dead, GNode remp, String _spawnerIP) throws RemoteException ;
62
63         public ArrayList<GNode> getGNodes() throws RemoteException ;
64         
65         public void removeAlgo( String _id, int _mode ) throws RemoteException ;
66         
67         public void setMapped( GNode _g, int _mode ) throws RemoteException ;
68         
69         public void removeMappedGNode( GNode _g, int _mode ) throws RemoteException ;
70         
71         // ** Tests ** //
72         public Algo getAlgo( String _spID ) throws RemoteException ;
73 }
74
75 /** ! **/