public class BasicStreamWriterSizeCollector extends com.google.common.util.concurrent.AbstractIdleService implements StreamWriterSizeCollector
StreamWriterSizeCollector.| Constructor and Description |
|---|
BasicStreamWriterSizeCollector() |
| Modifier and Type | Method and Description |
|---|---|
Map<Id.Stream,AtomicLong> |
getStreamSizes() |
long |
getTotalCollected(Id.Stream streamId)
Get the total amount of bytes collected for the stream
streamId so far. |
void |
received(Id.Stream streamId,
long dataSize)
Called to notify this manager that
dataSize bytes of data has been ingested by the stream
streamId using the stream handler from which this code is executed. |
protected void |
shutDown() |
protected void |
startUp() |
addListener, executor, isRunning, start, startAndWait, state, stop, stopAndWait, toStringprotected void startUp()
throws Exception
startUp in class com.google.common.util.concurrent.AbstractIdleServiceExceptionprotected void shutDown()
throws Exception
shutDown in class com.google.common.util.concurrent.AbstractIdleServiceExceptionpublic Map<Id.Stream,AtomicLong> getStreamSizes()
getStreamSizes in interface StreamWriterSizeCollectorpublic long getTotalCollected(Id.Stream streamId)
StreamWriterSizeCollectorstreamId so far.getTotalCollected in interface StreamWriterSizeCollectorstreamId - stream Id to get the total amount of data collected forstreamId so farpublic void received(Id.Stream streamId, long dataSize)
StreamWriterSizeCollectordataSize bytes of data has been ingested by the stream
streamId using the stream handler from which this code is executed. The dataSize
is an incremental size.received in interface StreamWriterSizeCollectorstreamId - Id of the stream that ingested data.dataSize - amount of data ingested in bytes.Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.