public class EventReceiverFirehoseFactory.EventReceiverFirehose extends Object implements ChatHandler, Firehose, EventReceiverFirehoseMetric
| Constructor and Description |
|---|
EventReceiverFirehose(MapInputRowParser parser) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addAll(InputStream in,
javax.servlet.http.HttpServletRequest req) |
void |
addRows(Iterable<InputRow> rows) |
void |
close() |
Runnable |
commit()
Returns a runnable that will "commit" everything read up to the point at which commit() is called.
|
long |
getBytesReceived()
Return the number of bytes received by the firehose.
|
int |
getCapacity()
Return the capacity of the buffer.
|
int |
getCurrentBufferSize()
Return the current number of
InputRow that are stored in the buffer. |
boolean |
hasMore()
Returns whether there are more rows to process.
|
boolean |
isClosed() |
InputRow |
nextRow()
The next row available.
|
javax.ws.rs.core.Response |
shutdown(String shutoffTime) |
public EventReceiverFirehose(MapInputRowParser parser)
public javax.ws.rs.core.Response addAll(InputStream in, @Context javax.servlet.http.HttpServletRequest req)
public boolean hasMore()
Firehosepublic InputRow nextRow()
Firehosepublic Runnable commit()
FirehoseA simple implementation of this interface might do nothing when run() is called (in which case the same do-nothing instance can be returned every time), or a more complex implementation might clean up temporary resources that are no longer needed because of InputRows delivered by prior calls to ##nextRow().
public int getCurrentBufferSize()
EventReceiverFirehoseMetricInputRow that are stored in the buffer.getCurrentBufferSize in interface EventReceiverFirehoseMetricpublic int getCapacity()
EventReceiverFirehoseMetricgetCapacity in interface EventReceiverFirehoseMetricpublic long getBytesReceived()
EventReceiverFirehoseMetricgetBytesReceived in interface EventReceiverFirehoseMetricpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void addRows(Iterable<InputRow> rows) throws InterruptedException
InterruptedExceptionpublic javax.ws.rs.core.Response shutdown(String shutoffTime)
public boolean isClosed()
Copyright © 2011–2017. All rights reserved.