net.java.dev.moskito.core.dynamic
Class EntryCountLimitedOnDemandStatsProducer
java.lang.Object
net.java.dev.moskito.core.dynamic.OnDemandStatsProducer
net.java.dev.moskito.core.dynamic.EntryCountLimitedOnDemandStatsProducer
- All Implemented Interfaces:
- Inspectable, IStatsProducer
public class EntryCountLimitedOnDemandStatsProducer
- extends OnDemandStatsProducer
|
Field Summary |
private int |
limit
|
limit
private int limit
EntryCountLimitedOnDemandStatsProducer
public EntryCountLimitedOnDemandStatsProducer(String aProducerId,
String aCategory,
String aSubsystem,
IOnDemandStatsFactory aStatsFactory,
int aLimit)
getLimit
public int getLimit()
setLimit
public void setLimit(int limit)
getProducerNameExtension
protected String getProducerNameExtension()
- Overrides:
getProducerNameExtension in class OnDemandStatsProducer
limitForNewEntriesReached
protected boolean limitForNewEntriesReached()
- Description copied from class:
OnDemandStatsProducer
- The getStats method checked whether the limit is reached before creating a new stat object. Overwrite this function and return true if you want to limit the number of possible stored stats. Not limiting the
stats can result in memory leak if someone can influence the stat names from the outside. Therefore MoskitoFilters are using
EntryCountLimitedOnDemandStatsProducer instead.
- Overrides:
limitForNewEntriesReached in class OnDemandStatsProducer
- Returns:
- false
toString
public String toString()
- Overrides:
toString in class OnDemandStatsProducer
Copyright © 2006 MoSKito Project Team. All Rights Reserved.
MoSKito, the open source java monitoring framework