Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Customized Threads with generic name for easier monitoring.

luccioman46f37e38dc0e
diff --git a/source/net/yacy/crawler/RecrawlBusyThread.java b/source/net/yacy/crawler/RecrawlBusyThread.java
index 8533e37aa..87c317909 100644
--- a/source/net/yacy/crawler/RecrawlBusyThread.java
+++ b/source/net/yacy/crawler/RecrawlBusyThread.java
@@ -62,6 +62,7 @@ public class RecrawlBusyThread extends AbstractBusyThread {
public RecrawlBusyThread(Switchboard xsb) {
super(3000, 1000); // set lower limits of cycle delay
+ setName(THREAD_NAME);
this.setIdleSleep(10*60000); // set actual cycle delays
this.setBusySleep(2*60000);
this.setPriority(Thread.MIN_PRIORITY);
diff --git a/source/net/yacy/document/importer/WarcImporter.java b/source/net/yacy/document/importer/WarcImporter.java
index 5b3cb2c49..6fa81ec76 100644
--- a/source/net/yacy/document/importer/WarcImporter.java
+++ b/source/net/yacy/document/importer/WarcImporter.java
@@ -70,6 +70,7 @@ public class WarcImporter extends Thread implements Importer {
private boolean abort = false; // flag to signal stop of import
public WarcImporter(InputStream f) {
+ super("WarcImporter - from InputStream");
source = f;
recordCnt = 0;
sourceSize = -1;
@@ -88,6 +89,7 @@ public class WarcImporter extends Thread implements Importer {
}
public WarcImporter(File f) throws FileNotFoundException{
+ super("WarcImporter - from file " + f.getName());
name = f.getName();
sourceSize = f.length();
source = new FileInputStream(f);
diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java
index 05a85ec35..8e9c45d14 100644
--- a/source/net/yacy/search/Switchboard.java
+++ b/source/net/yacy/search/Switchboard.java
@@ -4297,7 +4297,7 @@ public final class Switchboard extends serverSwitch {
final int shutdownPort;
if ((shutdownPort = this.getConfigInt(SwitchboardConstants.SERVER_SHUTDOWNPORT, 0)) > 0) {
// init thread to listen to a shutdown port - to receive a shutdown signal
- Thread shutdownThread = new Thread() {
+ Thread shutdownThread = new Thread("Switchboard.waitForShutdown") {
@Override
public void run() {
ServerSocket ss = null;