public class NailStats
extends java.lang.Object
implements java.lang.Cloneable
Collects and provides statistics on a nail.
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
lock |
private java.lang.Class |
nailclass |
private long |
refCounter |
private long |
runCounter |
Constructor and Description |
---|
NailStats(java.lang.Class nailclass)
Creates a new NailStats object for the specified class
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a copy of this
NailStats object. |
boolean |
equals(java.lang.Object o)
Returns true iff the specified
NailStats object
is tracking the same class. |
java.lang.Class |
getNailClass()
Returns the class for which we're tracking statistics
|
long |
getRefCount()
Returns the number of sessions currently running this nail.
|
long |
getRunCount()
Returns the number of times this nail has been run.
|
int |
hashCode() |
(package private) void |
nailFinished()
Logs the fact that an instance of this nail has finished
|
(package private) void |
nailStarted()
Logs the fact that an instance of this nail has started
|
java.lang.String |
toString()
Returns a String representation of this
NailStats
object, in the form "classname: runcount/refcount". |
private java.lang.Class nailclass
private long runCounter
private long refCounter
private java.lang.Object lock
NailStats(java.lang.Class nailclass)
nailclass
- the class for which we'll collect statisticsvoid nailStarted()
void nailFinished()
public long getRunCount()
public long getRefCount()
public java.lang.Class getNailClass()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object o)
NailStats
object
is tracking the same class.equals
in class java.lang.Object
o
- the NailStats object to checkNailStats
object
is tracking the same class.public java.lang.Object clone()
NailStats
object.clone
in class java.lang.Object
NailStats
object.public java.lang.String toString()
NailStats
object, in the form "classname: runcount/refcount".
*return a String representation of this NailStats
object.toString
in class java.lang.Object