com.sun.sgs.profile
Interface ProfileCounter

All Known Subinterfaces:
AggregateProfileCounter, TaskProfileCounter

public interface ProfileCounter

A counter used in profiling. All counters have a name associated with them, and start at zero. Counters can only be incremented.

Profile counters are created with calls to ProfileConsumer.createCounter. A counter's name includes both the name supplied to createCounter and the value of ProfileConsumer.getName().


Method Summary
 String getName()
          Returns the name of this counter.
 void incrementCount()
          Increments the counter by 1.
 void incrementCount(long value)
          Increments the counter by the given non-negative value.
 

Method Detail

getName

String getName()
Returns the name of this counter.

Returns:
the counter's name

incrementCount

void incrementCount()
Increments the counter by 1.


incrementCount

void incrementCount(long value)
Increments the counter by the given non-negative value.

Parameters:
value - the amount to increment the counter
Throws:
IllegalArgumentException - if value is negative

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved