Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
removed unused options from BusyThreads
orbiter0fcd8097a362
diff --git a/source/net/yacy/kelondro/workflow/AbstractBusyThread.java b/source/net/yacy/kelondro/workflow/AbstractBusyThread.javaindex e720b8499..98f26062f 100644--- a/source/net/yacy/kelondro/workflow/AbstractBusyThread.java+++ b/source/net/yacy/kelondro/workflow/AbstractBusyThread.java@@ -41,18 +41,12 @@ public abstract class AbstractBusyThread extends AbstractThread implements BusyTprivate boolean intermissionObedient = true;private final Object syncObject = new Object();- private long maxIdleSleep = Long.MAX_VALUE, minIdleSleep = Long.MIN_VALUE;- private long maxBusySleep = Long.MAX_VALUE, minBusySleep = Long.MIN_VALUE;+ private long idleSleep = Long.MIN_VALUE;+ private long busySleep = Long.MIN_VALUE;- public AbstractBusyThread(- long minIdleSleep,- long maxIdleSleep,- long minBusySleep,- long maxBusySleep) {- this.minIdleSleep = minIdleSleep;- this.maxIdleSleep = maxIdleSleep;- this.minBusySleep = minBusySleep;- this.maxBusySleep = maxBusySleep;+ public AbstractBusyThread(long idleSleep, long busySleep) {+ this.idleSleep = idleSleep;+ this.busySleep = busySleep;}@Override@@ -64,7 +58,7 @@ public abstract class AbstractBusyThread extends AbstractThread implements BusyT@Overridepublic final long setIdleSleep(final long milliseconds) {// sets a sleep time for pauses between two jobs- idlePause = Math.min(this.maxIdleSleep, Math.max(this.minIdleSleep, milliseconds));+ idlePause = Math.max(this.idleSleep, milliseconds);return idlePause;}@@ -76,7 +70,7 @@ public abstract class AbstractBusyThread extends AbstractThread implements BusyT@Overridepublic final long setBusySleep(final long milliseconds) {// sets a sleep time for pauses between two jobs- busyPause = Math.min(this.maxBusySleep, Math.max(this.minBusySleep, milliseconds));+ busyPause = Math.max(this.busySleep, milliseconds);return busyPause;}diff --git a/source/net/yacy/kelondro/workflow/InstantBusyThread.java b/source/net/yacy/kelondro/workflow/InstantBusyThread.javaindex 9efd38b05..1a03b79b5 100644--- a/source/net/yacy/kelondro/workflow/InstantBusyThread.java+++ b/source/net/yacy/kelondro/workflow/InstantBusyThread.java@@ -44,11 +44,9 @@ public final class InstantBusyThread extends AbstractBusyThread implements BusyTfinal String jobExec,final String jobCount,final String freemem,- final long minIdleSleep,- final long maxIdleSleep,- final long minBusySleep,- final long maxBusySleep) {- super(minIdleSleep, maxIdleSleep, minBusySleep, maxBusySleep);+ final long idleSleep,+ final long busySleep) {+ super(idleSleep, busySleep);// jobExec is the name of a method of the object 'env' that executes the one-step-run// jobCount is the name of a method that returns the size of the job@@ -159,8 +157,7 @@ public final class InstantBusyThread extends AbstractBusyThread implements BusyTpublic static BusyThread oneTimeJob(final Object env, final String jobExec, final long startupDelay) {// start the job and execute it once as background process- final BusyThread thread = new InstantBusyThread(- env, jobExec, null, null, Long.MIN_VALUE, Long.MAX_VALUE, Long.MIN_VALUE, Long.MAX_VALUE);+ final BusyThread thread = new InstantBusyThread(env, jobExec, null, null, Long.MIN_VALUE, Long.MIN_VALUE);thread.setStartupSleep(startupDelay);thread.setIdleSleep(-1);thread.setBusySleep(-1);diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.javaindex 9cdc77997..c8542c726 100644--- a/source/net/yacy/search/Switchboard.java+++ b/source/net/yacy/search/Switchboard.java@@ -990,10 +990,8 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.CLEANUP_METHOD_JOBCOUNT,SwitchboardConstants.CLEANUP_METHOD_FREEMEM,30000,- Long.MAX_VALUE,- 10000,- Long.MAX_VALUE),- 60000); // all 5 Minutes, wait 1 minute until first run+ 10000),+ 60000); // all 10 minutes, wait 1 minute until first rundeployThread(SwitchboardConstants.SURROGATES,"Surrogates",@@ -1005,9 +1003,7 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.SURROGATES_METHOD_JOBCOUNT,SwitchboardConstants.SURROGATES_METHOD_FREEMEM,20000,- Long.MAX_VALUE,- 0,- Long.MAX_VALUE),+ 0),10000);deployThread(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL,@@ -1020,9 +1016,7 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL_METHOD_JOBCOUNT,SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL_METHOD_FREEMEM,0,- Long.MAX_VALUE,- 0,- Long.MAX_VALUE),+ 0),10000);deployThread(SwitchboardConstants.CRAWLJOB_REMOTE_CRAWL_LOADER,@@ -1035,9 +1029,7 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.CRAWLJOB_REMOTE_CRAWL_LOADER_METHOD_JOBCOUNT,SwitchboardConstants.CRAWLJOB_REMOTE_CRAWL_LOADER_METHOD_FREEMEM,10000,- Long.MAX_VALUE,- 10000,- Long.MAX_VALUE),+ 10000),10000); // error here?deployThread(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL,@@ -1050,9 +1042,7 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL_METHOD_JOBCOUNT,SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL_METHOD_FREEMEM,0,- Long.MAX_VALUE,- 0,- Long.MAX_VALUE),+ 0),10000);deployThread(SwitchboardConstants.SEED_UPLOAD,@@ -1065,9 +1055,7 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.SEED_UPLOAD_METHOD_JOBCOUNT,SwitchboardConstants.SEED_UPLOAD_METHOD_FREEMEM,600000,- Long.MAX_VALUE,- 300000,- Long.MAX_VALUE),+ 300000),180000);deployThread(SwitchboardConstants.PEER_PING,@@ -1080,9 +1068,7 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.PEER_PING_METHOD_JOBCOUNT,SwitchboardConstants.PEER_PING_METHOD_FREEMEM,30000,- Long.MAX_VALUE,- 30000,- Long.MAX_VALUE),+ 30000),10000);deployThread(SwitchboardConstants.INDEX_DIST,@@ -1095,9 +1081,7 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.INDEX_DIST_METHOD_JOBCOUNT,SwitchboardConstants.INDEX_DIST_METHOD_FREEMEM,10000,- Long.MAX_VALUE,- 1000,- Long.MAX_VALUE),+ 1000),60000,Long.parseLong(getConfig(SwitchboardConstants.INDEX_DIST_IDLESLEEP, "5000")),Long.parseLong(getConfig(SwitchboardConstants.INDEX_DIST_BUSYSLEEP, "0")),@@ -1117,9 +1101,7 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.PEER_PING_METHOD_JOBCOUNT,SwitchboardConstants.PEER_PING_METHOD_FREEMEM,3000,- 10000,- 3000,- 10000),+ 3000),2000);deployThread("730_ccfilter",@@ -1132,9 +1114,7 @@ public final class Switchboard extends serverSwitch {SwitchboardConstants.PEER_PING_METHOD_JOBCOUNT,SwitchboardConstants.PEER_PING_METHOD_FREEMEM,3000,- 10000,- 3000,- 10000),+ 3000),2000);// set network-specific performance attributesdiff --git a/source/net/yacy/search/index/ReindexSolrBusyThread.java b/source/net/yacy/search/index/ReindexSolrBusyThread.javaindex 88209f91e..94ff69069 100644--- a/source/net/yacy/search/index/ReindexSolrBusyThread.java+++ b/source/net/yacy/search/index/ReindexSolrBusyThread.java@@ -64,7 +64,7 @@ import org.apache.solr.common.SolrInputDocument;* @param query = a solr query to select documents to reindex (like h5_txt:[* TO *])*/public ReindexSolrBusyThread(String query) {- super(100,1000,0,500);+ super(100,0);this.esc = Switchboard.getSwitchboard().index.fulltext().getDefaultConnector();this.colcfg = Switchboard.getSwitchboard().index.fulltext().getDefaultConfiguration();