A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more than 100 codacy treats, not bad
[simgrid.git]
/
examples
/
java
/
app
/
bittorrent
/
Peer.java
diff --git
a/examples/java/app/bittorrent/Peer.java
b/examples/java/app/bittorrent/Peer.java
index
3a2e19e
..
94d0a68
100644
(file)
--- a/
examples/java/app/bittorrent/Peer.java
+++ b/
examples/java/app/bittorrent/Peer.java
@@
-216,7
+216,7
@@
public class Peer extends Process {
return success;
}
return success;
}
- void handleMessage(Task task) {
+
private
void handleMessage(Task task) {
MessageTask message = (MessageTask)task;
Connection remotePeer = peers.get(message.peerId);
switch (message.type) {
MessageTask message = (MessageTask)task;
Connection remotePeer = peers.get(message.peerId);
switch (message.type) {
@@
-332,7
+332,7
@@
public class Peer extends Process {
beginReceiveTime = Msg.getClock();
}
beginReceiveTime = Msg.getClock();
}
- void waitForPieces() {
+
private
void waitForPieces() {
boolean finished = false;
while (Msg.getClock() < deadline && !finished) {
if (commReceived == null) {
boolean finished = false;
while (Msg.getClock() < deadline && !finished) {
if (commReceived == null) {
@@
-380,7
+380,7
@@
public class Peer extends Process {
* If the peer has more than pieces, he downloads the pieces that are the less
* replicated
*/
* If the peer has more than pieces, he downloads the pieces that are the less
* replicated
*/
- void updateCurrentPiece() {
+
private
void updateCurrentPiece() {
if (currentPieces.size() >= (Common.FILE_PIECES - pieces)) {
return;
}
if (currentPieces.size() >= (Common.FILE_PIECES - pieces)) {
return;
}