util
Class MotorizedQueue
java.lang.Object
|
+--util.MotorizedQueue
- public class MotorizedQueue
- extends Object
This makes it easy for a thread to serve a bunch of objects to
another thread with complete syncronization and without worry
about multiple objects being processed at once. get() will
return when an object is available.
Method Summary |
void |
add(Object o)
|
Object |
get()
Block until something available, and then return it. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MotorizedQueue
public MotorizedQueue()
add
public void add(Object o)
get
public Object get()
- Block until something available, and then return it.