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()
Firehose
public InputRow nextRow()
Firehose
public Runnable commit()
Firehose
A 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()
EventReceiverFirehoseMetric
InputRow
that are stored in the buffer.getCurrentBufferSize
in interface EventReceiverFirehoseMetric
public int getCapacity()
EventReceiverFirehoseMetric
getCapacity
in interface EventReceiverFirehoseMetric
public long getBytesReceived()
EventReceiverFirehoseMetric
getBytesReceived
in interface EventReceiverFirehoseMetric
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void addRows(Iterable<InputRow> rows) throws InterruptedException
InterruptedException
public javax.ws.rs.core.Response shutdown(String shutoffTime)
public boolean isClosed()
Copyright © 2011–2017. All rights reserved.