Change the wait time on operations to 50ms

This commit is contained in:
Joshua Kissoon 2014-04-13 18:58:40 +05:30
parent 4888bf4dd4
commit c31e0002e2
4 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ import java.io.File;
public class DefaultConfiguration implements KadConfiguration public class DefaultConfiguration implements KadConfiguration
{ {
private final static long RESTORE_INTERVAL = 5 * 1000; // Default at 1 hour private final static long RESTORE_INTERVAL = 60 * 1000; // Default at 1 hour
private final static long RESPONSE_TIMEOUT = 1500; private final static long RESPONSE_TIMEOUT = 1500;
private final static long OPERATION_TIMEOUT = 30000; private final static long OPERATION_TIMEOUT = 30000;
private final static int CONCURRENCY = 10; private final static int CONCURRENCY = 10;

View File

@ -56,7 +56,7 @@ public class ConnectOperation implements Operation, Receiver
/* If we haven't finished as yet, wait for a maximum of config.operationTimeout() time */ /* If we haven't finished as yet, wait for a maximum of config.operationTimeout() time */
int totalTimeWaited = 0; int totalTimeWaited = 0;
int timeInterval = 100; // We re-check every 300 milliseconds int timeInterval = 50; // We re-check every 300 milliseconds
while (totalTimeWaited < this.config.operationTimeout()) while (totalTimeWaited < this.config.operationTimeout())
{ {
if (error) if (error)

View File

@ -108,7 +108,7 @@ public class ContentLookupOperation implements Operation, Receiver
/* If we haven't finished as yet, wait for a maximum of config.operationTimeout() time */ /* If we haven't finished as yet, wait for a maximum of config.operationTimeout() time */
int totalTimeWaited = 0; int totalTimeWaited = 0;
int timeInterval = 100; // We re-check every 300 milliseconds int timeInterval = 50; // We re-check every 300 milliseconds
while (totalTimeWaited < this.config.operationTimeout()) while (totalTimeWaited < this.config.operationTimeout())
{ {
if (!this.askNodesorFinish()) if (!this.askNodesorFinish())

View File

@ -99,7 +99,7 @@ public class NodeLookupOperation implements Operation, Receiver
/* If we haven't finished as yet, wait for a maximum of config.operationTimeout() time */ /* If we haven't finished as yet, wait for a maximum of config.operationTimeout() time */
int totalTimeWaited = 0; int totalTimeWaited = 0;
int timeInterval = 100; // We re-check every 300 milliseconds int timeInterval = 50; // We re-check every 300 milliseconds
while (totalTimeWaited < this.config.operationTimeout()) while (totalTimeWaited < this.config.operationTimeout())
{ {
if (!this.askNodesorFinish()) if (!this.askNodesorFinish())