public class OnDemandStatsProducer<S extends IStats> extends Object implements IStatsProducer<S>, Inspectable, TracingAwareProducer, AutoTieAbleProducer
| Modifier and Type | Field and Description |
|---|---|
static String |
CUMULATED_STATS_NAME
Constant for cumulated (aggregated) stats name.
|
| Constructor and Description |
|---|
OnDemandStatsProducer(String aProducerId,
String aCategory,
String aSubsystem,
IOnDemandStatsFactory<S> aStatsFactory)
Creates a new OnDemandStatsProducer instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<S> |
getCachedStatsList() |
String |
getCategory()
Returns the category of this producer.
|
CreationInfo |
getCreationInfo()
Returns the creation info about a producer.
|
S |
getDefaultStats() |
String |
getProducerId()
Returns the meaningful id of this producer.
|
protected String |
getProducerNameExtension() |
List<S> |
getStats()
Returns the list of all stats.
|
S |
getStats(String name) |
String |
getSubsystem()
Returns the subsystem the current producer is located in.
|
protected boolean |
limitForNewEntriesReached()
The getStats method checked whether the limit is reached before creating a new stat object.
|
void |
setTracingSupported(boolean tracingSupported) |
String |
toString() |
boolean |
tracingSupported() |
public static final String CUMULATED_STATS_NAME
public OnDemandStatsProducer(String aProducerId, String aCategory, String aSubsystem, IOnDemandStatsFactory<S> aStatsFactory)
aProducerId - a producer idaCategory - a categoryaSubsystem - a subsystemaStatsFactory - a factory for IStat object creation.public S getStats(String name) throws OnDemandStatsProducerException
OnDemandStatsProducerExceptionpublic String getCategory()
IStatsProducergetCategory in interface IStatsProducer<S extends IStats>public String getProducerId()
IStatsProducergetProducerId in interface IStatsProducer<S extends IStats>public List<S> getStats()
IStatsProducergetStats in interface IStatsProducer<S extends IStats>public String getSubsystem()
IStatsProducergetSubsystem in interface IStatsProducer<S extends IStats>public S getDefaultStats()
protected boolean limitForNewEntriesReached()
protected String getProducerNameExtension()
public CreationInfo getCreationInfo()
getCreationInfo in interface Inspectablepublic void setTracingSupported(boolean tracingSupported)
public boolean tracingSupported()
tracingSupported in interface TracingAwareProducerCopyright © 2010-2017 anotheria.net. All Rights Reserved.