Prep for stopping threads

This commit is contained in:
zzz
2022-01-11 16:30:22 -05:00
parent aa71e88958
commit e62edc04ad
5 changed files with 10 additions and 5 deletions

View File

@ -21,6 +21,7 @@ public class InboundBandwidthTracker extends Thread implements Tracker {
* Start daemon that checks to current inbound bandwidth of the router.
*/
public InboundBandwidthTracker(int interval) {
super("IToopie-IBT");
updateInterval = interval;
this.setDaemon(true);
this.start();
@ -38,7 +39,7 @@ public class InboundBandwidthTracker extends Thread implements Tracker {
try {
Thread.sleep(updateInterval);
} catch (InterruptedException e) {
// nop
break;
}
}

View File

@ -155,6 +155,7 @@ public class ObjectRecorder extends Thread {
* the interval of inspection in ms.
*/
public ObjectRecorder(final Tracker toinspect, final long interval) {
super("IToopie-OR");
this.m_interval = interval;
this.m_toinspect = toinspect;
this.setDaemon(true);
@ -356,7 +357,7 @@ public class ObjectRecorder extends Thread {
try {
Thread.sleep(this.m_interval);
} catch (final InterruptedException e) {
// nop
break;
}
this.inspect();
}

View File

@ -21,6 +21,7 @@ public class OutboundBandwidthTracker extends Thread implements Tracker {
* Start daemon that checks to current inbound bandwidth of the router.
*/
public OutboundBandwidthTracker(int interval) {
super("IToopie-OBT");
updateInterval = interval;
this.setDaemon(true);
this.start();
@ -38,7 +39,7 @@ public class OutboundBandwidthTracker extends Thread implements Tracker {
try {
Thread.sleep(updateInterval);
} catch (InterruptedException e) {
// nop
break;
}
}

View File

@ -22,6 +22,7 @@ public class ParticipatingTunnelsTracker extends Thread implements Tracker {
* Start daemon that checks to current inbound bandwidth of the router.
*/
public ParticipatingTunnelsTracker(int interval) {
super("IToopie-PTT");
updateInterval = interval;
this.setDaemon(true);
this.start();
@ -38,7 +39,7 @@ public class ParticipatingTunnelsTracker extends Thread implements Tracker {
try {
Thread.sleep(updateInterval);
} catch (InterruptedException e) {
// nop
break;
}
}

View File

@ -25,6 +25,7 @@ public class RateStatTracker extends Thread implements Tracker {
* Start daemon that checks to current inbound bandwidth of the router.
*/
public RateStatTracker(String rateStat, long period, int interval) {
super("IToopie-RST");
this.rateStat = rateStat;
this.period = period;
updateInterval = interval;
@ -49,7 +50,7 @@ public class RateStatTracker extends Thread implements Tracker {
try {
Thread.sleep(updateInterval);
} catch (InterruptedException e) {
// nop
break;
}
}