Skip to content

Commit

Permalink
Customized Threads with generic name for easier monitoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
luccioman committed Oct 31, 2017
1 parent 8a48f80 commit 46f37e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions source/net/yacy/crawler/RecrawlBusyThread.java
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions source/net/yacy/document/importer/WarcImporter.java
Expand Up @@ -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;
Expand All @@ -88,6 +89,7 @@ public WarcImporter (InputStream f, String urlinfo) {
}

public WarcImporter(File f) throws FileNotFoundException{
super("WarcImporter - from file " + f.getName());
name = f.getName();
sourceSize = f.length();
source = new FileInputStream(f);
Expand Down
2 changes: 1 addition & 1 deletion source/net/yacy/search/Switchboard.java
Expand Up @@ -4297,7 +4297,7 @@ public boolean waitForShutdown() throws InterruptedException {
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;
Expand Down

0 comments on commit 46f37e3

Please sign in to comment.