Package org.loboevolution.pdf
Class Flag
java.lang.Object
org.loboevolution.pdf.Flag
A generic synchronized flag, because Java doesn't have one.
-
Constructor Details
-
Flag
public Flag()
-
-
Method Details
-
set
public void set()Sets the flag. Any pending waitForFlag calls will now return. -
clear
public void clear()Clears the flag. Do this before calling waitForFlag. -
waitForFlag
public void waitForFlag()Waits for the flag to be set, if it is not set already. This method catches InterruptedExceptions, so if you want notification of interruptions, use interruptibleWaitForFlag instead. -
interruptibleWaitForFlag
Waits for the flag to be set, if it is not set already.- Throws:
InterruptedException
- if any.
-