Customized Threads with generic name for easier monitoring.

pull/144/head
luccioman 7 years ago
parent 8a48f80909
commit 46f37e38dc

@ -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);

@ -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);

@ -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;

Loading…
Cancel
Save