public final class ResultPartitionWriter extends Object implements EventListener<TaskEvent>
The ResultPartitionWriter is the runtime API for producing results. It
supports two kinds of data to be sent: buffers and events.
| Constructor and Description |
|---|
ResultPartitionWriter(ResultPartition partition) |
| Modifier and Type | Method and Description |
|---|---|
BufferProvider |
getBufferProvider() |
int |
getNumberOfOutputChannels() |
ResultPartitionID |
getPartitionId() |
void |
onEvent(TaskEvent event) |
void |
subscribeToEvent(EventListener<TaskEvent> eventListener,
Class<? extends TaskEvent> eventType) |
void |
writeBuffer(Buffer buffer,
int targetChannel) |
void |
writeEndOfSuperstep() |
void |
writeEvent(AbstractEvent event,
int targetChannel) |
void |
writeEventToAllChannels(AbstractEvent event) |
public ResultPartitionWriter(ResultPartition partition)
public ResultPartitionID getPartitionId()
public BufferProvider getBufferProvider()
public int getNumberOfOutputChannels()
public void writeBuffer(Buffer buffer, int targetChannel) throws IOException
IOExceptionpublic void writeEvent(AbstractEvent event, int targetChannel) throws IOException
IOExceptionpublic void writeEventToAllChannels(AbstractEvent event) throws IOException
IOExceptionpublic void writeEndOfSuperstep()
throws IOException
IOExceptionpublic void subscribeToEvent(EventListener<TaskEvent> eventListener, Class<? extends TaskEvent> eventType)
public void onEvent(TaskEvent event)
onEvent in interface EventListener<TaskEvent>Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.