Changed visibility of some methods.
This commit is contained in:
parent
384c14b359
commit
e6e8b234eb
@ -178,7 +178,7 @@ public class Node {
|
||||
sendBroadcast(packet_id, command, data);
|
||||
}
|
||||
|
||||
void sendBroadcast(int packet_id, byte command, byte[] data) {
|
||||
protected void sendBroadcast(int packet_id, byte command, byte[] data) {
|
||||
ByteBuffer buffer = ByteBuffer.allocate(BUF_SIZE);
|
||||
|
||||
buffer.put(MessageType.BROADCAST);
|
||||
@ -215,19 +215,19 @@ public class Node {
|
||||
|
||||
}
|
||||
|
||||
boolean hasAck(int ack_id) {
|
||||
protected boolean hasAck(int ack_id) {
|
||||
return acks.containsKey(ack_id);
|
||||
}
|
||||
|
||||
Ack getAck(int ack_id) {
|
||||
protected Ack getAck(int ack_id) {
|
||||
return acks.get(ack_id);
|
||||
}
|
||||
|
||||
Ack removeAck(int ack_id) {
|
||||
protected Ack removeAck(int ack_id) {
|
||||
return acks.remove(ack_id);
|
||||
}
|
||||
|
||||
boolean addNeighbor(SocketAddress node) {
|
||||
protected boolean addNeighbor(SocketAddress node) {
|
||||
if (!hasNeighbor(node)) {
|
||||
neighbors.add(node);
|
||||
return true;
|
||||
@ -242,7 +242,7 @@ public class Node {
|
||||
* address to remove
|
||||
* @return True if an address was removed, else false
|
||||
*/
|
||||
boolean removeNeighbor(SocketAddress node) {
|
||||
protected boolean removeNeighbor(SocketAddress node) {
|
||||
SocketAddress removed = null;
|
||||
int idToRemove = getNeighborId(node);
|
||||
if (idToRemove != -1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user