|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.profile.ProfileConsumerImpl
class ProfileConsumerImpl
This simple implementation of ProfileConsumer reports all
data to a backing ProfileCollectorImpl.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.sun.sgs.profile.ProfileConsumer |
|---|
ProfileConsumer.ProfileDataType |
| Field Summary | |
|---|---|
static int |
DEFAULT_SAMPLE_AGGREGATE_CAPACITY
The default aggregate sample capacity. |
static double |
DEFAULT_SAMPLE_AGGREGATE_SMOOTHING
The default aggregate sample smoothing capacity, for calculating the exponential weighted average of the samples. |
| Constructor Summary | |
|---|---|
ProfileConsumerImpl(ProfileCollectorImpl profileCollector,
String name)
Creates an instance of ProfileConsumerImpl. |
|
| Method Summary | |
|---|---|
ProfileCounter |
createCounter(String name,
ProfileConsumer.ProfileDataType type,
ProfileCollector.ProfileLevel minLevel)
Creates the named counter in this consumer. |
ProfileOperation |
createOperation(String name,
ProfileConsumer.ProfileDataType type,
ProfileCollector.ProfileLevel minLevel)
Creates the named operation in this consumer. |
ProfileSample |
createSample(String name,
ProfileConsumer.ProfileDataType type,
ProfileCollector.ProfileLevel minLevel)
Creates the named sample collection in this consumer. |
String |
getName()
The profile consumer's unique name. |
(package private) Collection<ProfileOperation> |
getOperations()
Package private method to access all operations. |
ProfileCollector.ProfileLevel |
getProfileLevel()
Get the local profiling level for this consumer. |
void |
setProfileLevel(ProfileCollector.ProfileLevel level)
Set the local profiling level for this consumer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_SAMPLE_AGGREGATE_CAPACITY
public static final double DEFAULT_SAMPLE_AGGREGATE_SMOOTHING
| Constructor Detail |
|---|
ProfileConsumerImpl(ProfileCollectorImpl profileCollector,
String name)
ProfileConsumerImpl.
profileCollector - the backing ProfileCollectorImplname - an identifier for this consumer| Method Detail |
|---|
public ProfileCollector.ProfileLevel getProfileLevel()
ProfileCollector.getDefaultProfileLevel().
getProfileLevel in interface ProfileConsumerpublic void setProfileLevel(ProfileCollector.ProfileLevel level)
ProfileCollector.setDefaultProfileLevel(ProfileLevel) will
override this value.
setProfileLevel in interface ProfileConsumerlevel - the profiling level
public ProfileOperation createOperation(String name,
ProfileConsumer.ProfileDataType type,
ProfileCollector.ProfileLevel minLevel)
name,
type and minLevel, it is returned.
createOperation in interface ProfileConsumername - the name of the operationtype - the type of operation to createminLevel - the minimum level of profiling that must be set to report
this operation
ProfileOperation to note operations
public ProfileCounter createCounter(String name,
ProfileConsumer.ProfileDataType type,
ProfileCollector.ProfileLevel minLevel)
name,
type and minLevel, it is returned.
createCounter in interface ProfileConsumername - the name of the countertype - the type of counter to createminLevel - the minimum level of profiling that must be set to update
this counter
ProfileCounter
public ProfileSample createSample(String name,
ProfileConsumer.ProfileDataType type,
ProfileCollector.ProfileLevel minLevel)
name,
type, and minLevel, it is returned.
The default capacity of the created ProfileSample is
0 and can be modified
by calling AggregateProfileSample.setCapacity(int).
These samples use an exponential weighted average to calculate
their averages. The default smoothing factor for the aggregate sample
is 0.7 and can be modified
by calling AggregateProfileSample.setSmoothingFactor(double).
createSample in interface ProfileConsumername - a name or description of the sample collectiontype - the type of sample collection to createminLevel - the minimum level of profiling that must be set to record
this sample
ProfileSample that collects long datapublic String getName()
getName in interface ProfileConsumerCollection<ProfileOperation> getOperations()
ProfileCollector.
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||