T
- Tuple type.public class Sink<T> extends AbstractOplet<T,java.lang.Void>
Consumer
.
If the sinker
function implements AutoCloseable
then when this oplet is closed sinker.close()
is called.Constructor and Description |
---|
Sink()
Create a
Sink that discards all tuples. |
Sink(Consumer<T> sinker)
Create a
Sink oplet. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.util.List<Consumer<T>> |
getInputs()
Get the input stream data handlers for this oplet.
|
protected Consumer<T> |
getSinker()
Get the sink function that processes each tuple.
|
protected void |
setSinker(Consumer<T> sinker)
Set the sink function.
|
void |
start()
Start the oplet.
|
getOpletContext, initialize
public Sink()
Sink
that discards all tuples.
The sink function can be changed using
setSinker(Consumer)
.public java.util.List<Consumer<T>> getInputs()
Oplet
public void start()
Oplet
public void close() throws java.lang.Exception
java.lang.Exception
protected void setSinker(Consumer<T> sinker)
sinker
- Processing to be performed on each tuple.Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641