Methods Summary |
---|
public synchronized void | freeBusyFlag()
if (getBusyFlagOwner() == Thread.currentThread()) {
busycount--;
if (busycount == 0)
busyflag = null;
}
|
public void | getBusyFlag()
while (tryGetBusyFlag() == false) {
try {
Thread.sleep(100);
} catch (Exception e) {}
}
|
public synchronized java.lang.Thread | getBusyFlagOwner()
return busyflag;
|
public synchronized boolean | tryGetBusyFlag()
if (busyflag == null) {
busyflag = Thread.currentThread();
busycount = 1;
return true;
}
if (busyflag == Thread.currentThread()) {
busycount++;
return true;
}
return false;
|