public class AsyncLoader
extends java.lang.Object
| Constructor and Description |
|---|
AsyncLoader(int timeoutSeconds)
Create an AsyncLoader with the specified timeout.
|
| Modifier and Type | Method and Description |
|---|---|
void |
awaitLoadDone()
Wait upon the consumer to finish loading items.
|
void |
increment()
Increment the number of items loaded by 1.
|
void |
setNumItems(java.lang.Integer n)
Set the number of items.
|
void |
shutdown() |
void |
startLoading()
Acquire the lock as a producer and reset
progress-tracking variables.
|
public AsyncLoader(int timeoutSeconds)
public void startLoading()
public void increment()
public void setNumItems(java.lang.Integer n)
public void awaitLoadDone()
throws java.lang.InterruptedException
java.lang.InterruptedException - if the thread is interrupted
while waiting for the loading lock. This can happen due
to timeout.public void shutdown()