public class JavaAsyncCollectorWrapper<OUT> extends Object implements AsyncCollector<OUT>
JavaAsyncCollector
to a Scala
AsyncCollector
.
param: javaAsyncCollector to forward the calls to
Constructor and Description |
---|
JavaAsyncCollectorWrapper(AsyncCollector<OUT> javaAsyncCollector) |
Modifier and Type | Method and Description |
---|---|
void |
collect(scala.collection.Iterable<OUT> result)
Complete the async collector with a set of result elements.
|
void |
collect(Throwable throwable)
Complete this async collector with an error.
|
AsyncCollector<OUT> |
javaAsyncCollector() |
public JavaAsyncCollectorWrapper(AsyncCollector<OUT> javaAsyncCollector)
public AsyncCollector<OUT> javaAsyncCollector()
public void collect(scala.collection.Iterable<OUT> result)
AsyncCollector
Note that it should be called for exactly one time in the user code. Calling this function for multiple times will cause data lose.
Put all results in a Iterable
and then issue AsyncCollector.collect(Iterable).
collect
in interface AsyncCollector<OUT>
result
- to complete the async collector withpublic void collect(Throwable throwable)
AsyncCollector
collect
in interface AsyncCollector<OUT>
throwable
- to complete the async collector withCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.