public class SynchronousBase extends Object
| Constructor and Description |
|---|
SynchronousBase()
Initiate class with a count down of one only
|
SynchronousBase(int count)
Initiate class with a task count
|
| Modifier and Type | Method and Description |
|---|---|
void |
await()
Wait until all tasks are marked as done
|
boolean |
await(long timeout,
TimeUnit unit)
Wait until all tasks are marked as done or timeout after given time
|
protected void |
markAsDone()
Mark as done one task
|
public SynchronousBase(int count)
count - Number of tasks we will wait onpublic SynchronousBase()
protected void markAsDone()
public void await()
throws InterruptedException
InterruptedExceptionpublic boolean await(long timeout,
TimeUnit unit)
throws InterruptedException
timeout - Time to waitunit - Unit for timeInterruptedExceptionCopyright © 2017. All rights reserved.