T - Element typepublic class BlockingElementsSet<T> extends Object
| Constructor and Description |
|---|
BlockingElementsSet() |
| Modifier and Type | Method and Description |
|---|---|
T |
getElement(org.apache.hadoop.util.Progressable progressable)
Get one element when it becomes available,
reporting progress while waiting
|
List<T> |
getElements(int elementCount,
org.apache.hadoop.util.Progressable progressable)
Get desired number of elements when they become available,
reporting progress while waiting
|
void |
offer(T element)
Put an element in the set
|
public void offer(T element)
element - Element to putpublic T getElement(org.apache.hadoop.util.Progressable progressable)
progressable - Progressable to report progresspublic List<T> getElements(int elementCount, org.apache.hadoop.util.Progressable progressable)
elementCount - How many elements to wait forprogressable - Progressable to report progressCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.