|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.metrics.BatchingSliceConsumer
public abstract class BatchingSliceConsumer
Collects slices for a period of time and processes them in batches.
Nested Class Summary | |
---|---|
static class |
BatchingSliceConsumer.SliceEntry
Helper class to serialize accumulated slices. |
Constructor Summary | |
---|---|
BatchingSliceConsumer()
|
Method Summary | |
---|---|
boolean |
consumeSlice(java.lang.String category,
biz.hammurapi.metrics.Slice slice)
|
protected abstract boolean |
processSlices(java.util.List slices)
Subclasses shall implement this method. |
void |
setInterval(long interval)
Sets batching interval. |
void |
setMaxSlices(int maxSlices)
Sets maximum number of slices to be retained if processing fails. |
void |
setOwner(java.lang.Object owner)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BatchingSliceConsumer()
Method Detail |
---|
public void setMaxSlices(int maxSlices)
maxSlices
- public void setInterval(long interval)
interval
- public boolean consumeSlice(java.lang.String category, biz.hammurapi.metrics.Slice slice)
consumeSlice
in interface biz.hammurapi.metrics.SliceConsumer
public void setOwner(java.lang.Object owner)
setOwner
in interface biz.hammurapi.config.Component
public void start() throws biz.hammurapi.config.ConfigurationException
start
in interface biz.hammurapi.config.Component
biz.hammurapi.config.ConfigurationException
public void stop() throws biz.hammurapi.config.ConfigurationException
stop
in interface biz.hammurapi.config.Component
biz.hammurapi.config.ConfigurationException
protected abstract boolean processSlices(java.util.List slices)
slices
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |