|
|
@ -63,6 +63,7 @@ public abstract class serverAbstractThread extends Thread implements serverThrea
|
|
|
|
private long threadBlockTimestamp = System.currentTimeMillis();
|
|
|
|
private long threadBlockTimestamp = System.currentTimeMillis();
|
|
|
|
private long idleCycles = 0, busyCycles = 0, outofmemoryCycles = 0;
|
|
|
|
private long idleCycles = 0, busyCycles = 0, outofmemoryCycles = 0;
|
|
|
|
private Object syncObject = null;
|
|
|
|
private Object syncObject = null;
|
|
|
|
|
|
|
|
private boolean intermissionObedient = true;
|
|
|
|
|
|
|
|
|
|
|
|
protected final void announceThreadBlockApply() {
|
|
|
|
protected final void announceThreadBlockApply() {
|
|
|
|
// shall only be used, if a thread blocks for an important reason
|
|
|
|
// shall only be used, if a thread blocks for an important reason
|
|
|
@ -115,6 +116,11 @@ public abstract class serverAbstractThread extends Thread implements serverThrea
|
|
|
|
memprereq = freeBytes;
|
|
|
|
memprereq = freeBytes;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setObeyIntermission(boolean obey) {
|
|
|
|
|
|
|
|
// defines if the thread should obey the intermission command
|
|
|
|
|
|
|
|
intermissionObedient = obey;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public final String getShortDescription() {
|
|
|
|
public final String getShortDescription() {
|
|
|
|
return this.shortDescr;
|
|
|
|
return this.shortDescr;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -237,7 +243,7 @@ public abstract class serverAbstractThread extends Thread implements serverThrea
|
|
|
|
Runtime rt = Runtime.getRuntime();
|
|
|
|
Runtime rt = Runtime.getRuntime();
|
|
|
|
|
|
|
|
|
|
|
|
while (running) {
|
|
|
|
while (running) {
|
|
|
|
if (this.intermission > 0) {
|
|
|
|
if ((this.intermissionObedient) && (this.intermission > 0)) {
|
|
|
|
long itime = this.intermission - System.currentTimeMillis();
|
|
|
|
long itime = this.intermission - System.currentTimeMillis();
|
|
|
|
if (itime > 0) {
|
|
|
|
if (itime > 0) {
|
|
|
|
logSystem("thread '" + this.getName() + "' breaks for intermission: " + (itime / 1000) + " seconds");
|
|
|
|
logSystem("thread '" + this.getName() + "' breaks for intermission: " + (itime / 1000) + " seconds");
|
|
|
|