Logo AND Algorithmique Numérique Distribuée

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