A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
jaceP2P.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correction of some bugs and performance enhancement.
[jaceP2P.git]
/
src
/
jaceP2P
/
JaceSuperNode.java
diff --git
a/src/jaceP2P/JaceSuperNode.java
b/src/jaceP2P/JaceSuperNode.java
index
4dcd3e9
..
f0e380d
100644
(file)
--- a/
src/jaceP2P/JaceSuperNode.java
+++ b/
src/jaceP2P/JaceSuperNode.java
@@
-29,6
+29,11
@@
public class JaceSuperNode {
// create his list of SuperNode
// containing the IPs and ports
// but not already the stubs
// create his list of SuperNode
// containing the IPs and ports
// but not already the stubs
+ if (System.getSecurityManager() == null) {
+ System.setSecurityManager(new SecurityManager());
+ }
+
+
SuperNodeListe.Instance().staticInitialization();
HeartBeatSNode.Instance().setHeartTime(heartTime);
SuperNodeListe.Instance().staticInitialization();
HeartBeatSNode.Instance().setHeartTime(heartTime);
@@
-70,17
+75,17
@@
public class JaceSuperNode {
next = index + 1;
HeartBeatSNode.Instance().setServer(
((SuperNodeData) SuperNodeListe.Instance().getListe()
next = index + 1;
HeartBeatSNode.Instance().setServer(
((SuperNodeData) SuperNodeListe.Instance().getListe()
- .
elementA
t(next)).getStub());
+ .
ge
t(next)).getStub());
if (index == 0)
previous = SuperNodeListe.Instance().getListe().size() - 1;
else
previous = index - 1;
System.out.println(index + " " + next + " " + previous);
try {
if (index == 0)
previous = SuperNodeListe.Instance().getListe().size() - 1;
else
previous = index - 1;
System.out.println(index + " " + next + " " + previous);
try {
- ((SuperNodeData) SuperNodeListe.Instance().getListe().
elementA
t(
+ ((SuperNodeData) SuperNodeListe.Instance().getListe().
ge
t(
previous)).getStub().updateHeart(
((SuperNodeData) SuperNodeListe.Instance().getListe()
previous)).getStub().updateHeart(
((SuperNodeData) SuperNodeListe.Instance().getListe()
- .
elementA
t(index)).getStub());
+ .
ge
t(index)).getStub());
} catch (Exception e) {
System.err
} catch (Exception e) {
System.err
@@
-152,7
+157,7
@@
public class JaceSuperNode {
SuperNodeListe.Instance().forwardCountNode();
try {
SuperNodeListe.Instance().forwardCountNode();
try {
- snodeServer.delGNodeFromList( host, 0 ) ;
+ snodeServer.delGNodeFromList( host, 0
, ""
) ;
} catch (RemoteException e) {
System.err.println( "Unable to remove the dead node from the list !" ) ;
e.printStackTrace();
} catch (RemoteException e) {
System.err.println( "Unable to remove the dead node from the list !" ) ;
e.printStackTrace();