|
||||||||||
| 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<BatchingSliceConsumer.SliceEntry> 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.SliceConsumerpublic 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.Componentbiz.hammurapi.config.ConfigurationException
public void stop()
throws biz.hammurapi.config.ConfigurationException
stop in interface biz.hammurapi.config.Componentbiz.hammurapi.config.ConfigurationExceptionprotected abstract boolean processSlices(java.util.List<BatchingSliceConsumer.SliceEntry> slices)
slices -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||