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