Methods Summary |
---|
public long | getCount()
return ( this.methodCount);
|
public java.lang.String | getDescription()
return ( initial.getDescription() );
|
public long | getLastSampleTime()
return ( this.lastSampleTime );
|
public long | getMaxTime()
return ( this.max );
|
public long | getMinTime()
return ( this.min );
|
public java.lang.String | getName()
return ( initial.getName() );
|
public long | getStartTime()
return ( initial.getStartTime() );
|
public long | getTotalTime()
return ( this.total );
|
public java.lang.String | getUnit()
return ( initial.getUnit() );
|
public void | incrementCount(long current)Increments the count of operation execution by 1 and also increases the time
consumed. A successful execution of method will have all the data updated as:
- method count ++
- max time, min time and total time are accordingly adjusted
if (methodCount == 0) {
total = max = min = current;
} else {
total += current;
max = current >= max ? current : max;
min = current >= min ? min : current;
}
methodCount++;
lastSampleTime = System.currentTimeMillis();
|
public javax.management.j2ee.statistics.Statistic | modifiableView()
return ( this );
|
public void | reset()Resets the Statistic. Calling this method has following effect:
- Initial state of this Statistic is restored as far as Count, Minimum/Maximum
and Total time of execution is considered.
methodCount = initial.getCount();
min = initial.getMinTime();
max = initial.getMaxTime();
total = initial.getTotalTime();
lastSampleTime = initial.getLastSampleTime();
|
public void | setDescription(java.lang.String s)
try {
((StatisticImpl)this.initial).setDescription(s);
}
catch(final Exception e) {
}
|
public javax.management.j2ee.statistics.Statistic | unmodifiableView()This method is the essence of this class. Returns the unmodifiable view
of this instance.
return ( new TimeStatisticImpl(
this.methodCount,
this.max,
this.min,
this.total,
initial.getName(),
initial.getUnit(),
initial.getDescription(),
initial.getStartTime(),
this.lastSampleTime )
);
|