root / src / Protocols / ReclaimProtocol.java @ 2
History | View | Annotate | Download (425 Bytes)
1 |
package Protocols; |
---|---|
2 |
|
3 |
import Peers.Peer; |
4 |
|
5 |
public class ReclaimProtocol implements Runnable { |
6 |
|
7 |
private final int reclaimed; |
8 |
private final Peer peer; |
9 |
|
10 |
ReclaimProtocol(int size, Peer peer) {
|
11 |
this.reclaimed = size;
|
12 |
this.peer = peer;
|
13 |
} |
14 |
|
15 |
@Override
|
16 |
public void run() { |
17 |
if(!peer.getStorage().reclaimSpace(reclaimed))
|
18 |
System.out.println("Could not change the size"); |
19 |
|
20 |
} |
21 |
} |