public interface WorkQueue<T>
Modifier and Type | Method and Description |
---|---|
void |
add(T item)
add marks item as needing processing.
|
void |
done(T item)
Done marks item as done processing, and if it has been marked as dirty again,
|
T |
get()
Get blocks until it can return an item to be processed.
|
boolean |
isShuttingDown()
returns whether the queue shutdown.
|
int |
length()
length returns the current queue length, for informational purposes only.
|
void |
shutDown()
ShutDown will cause q to ignore all new items added to it.
|
void add(T item)
item
- item to addint length()
T get() throws java.lang.InterruptedException
java.lang.InterruptedException
void done(T item)
item
- specific itemvoid shutDown()
boolean isShuttingDown()
true
if theCopyright © 2019. All rights reserved.