public class OutputObjectAndByteCounter extends Object implements ElementCounter
ElementCounter that counts output objects, bytes, and mean bytes.| Constructor and Description |
|---|
OutputObjectAndByteCounter(ElementByteSizeObservable<?> elementByteSizeObservable,
CounterSet.AddCounterMutator addCounterMutator) |
| Modifier and Type | Method and Description |
|---|---|
OutputObjectAndByteCounter |
countBytes(String bytesCounterName)
Count output bytes.
|
OutputObjectAndByteCounter |
countMeanByte(String meanByteCounterName)
Count output mean byte.
|
OutputObjectAndByteCounter |
countObject(String objectCounterName)
Count output objects.
|
void |
finishLazyUpdate(Object elem)
Finishes output counters lazy updates.
|
Counter<Long> |
getByteCount() |
Counter<Long> |
getMeanByteCount() |
Counter<Long> |
getObjectCount() |
protected boolean |
sampleElement() |
void |
update(Object elem)
Updates output counters.
|
public OutputObjectAndByteCounter(ElementByteSizeObservable<?> elementByteSizeObservable, CounterSet.AddCounterMutator addCounterMutator)
public OutputObjectAndByteCounter countObject(String objectCounterName)
public OutputObjectAndByteCounter countBytes(String bytesCounterName)
public OutputObjectAndByteCounter countMeanByte(String meanByteCounterName)
public void update(Object elem) throws Exception
ElementCounterupdate in interface ElementCounterExceptionpublic void finishLazyUpdate(Object elem)
ElementCounterfinishLazyUpdate in interface ElementCounterprotected boolean sampleElement()