KademliaNode

- Removed the isRunning boolean since it's not used
- Made the statistician transient since we only keep stats temporary
This commit is contained in:
Joshua Kissoon 2014-05-08 10:41:51 +05:30
parent 1ff0fb8284
commit 3705107ce6

View File

@ -61,14 +61,11 @@ public class KademliaNode
private transient Timer refreshOperationTimer; private transient Timer refreshOperationTimer;
private transient TimerTask refreshOperationTTask; private transient TimerTask refreshOperationTTask;
/* Whether this node is up and running */
private boolean isRunning = false;
/* Factories */ /* Factories */
private final transient MessageFactory messageFactory; private final transient MessageFactory messageFactory;
/* Statistics */ /* Statistics */
private final KadStatistician statistician; private final transient KadStatistician statistician;
{ {
@ -103,7 +100,6 @@ public class KademliaNode
this.messageFactory = new MessageFactory(this, this.dht, this.config); this.messageFactory = new MessageFactory(this, this.dht, this.config);
this.server = new KadServer(udpPort, this.messageFactory, this.localNode, this.config, this.statistician); this.server = new KadServer(udpPort, this.messageFactory, this.localNode, this.config, this.statistician);
this.startRefreshOperation(); this.startRefreshOperation();
this.isRunning = true;
} }
/** /**
@ -379,8 +375,6 @@ public class KademliaNode
this.stopRefreshOperation(); this.stopRefreshOperation();
this.isRunning = false;
/* Save this Kademlia instance's state if required */ /* Save this Kademlia instance's state if required */
if (saveState) if (saveState)
{ {