org.sourceforge.jemm.client.events
Class LockTracerImpl

java.lang.Object
  extended by org.sourceforge.jemm.client.events.LockTracerImpl
All Implemented Interfaces:
LockTracer

public class LockTracerImpl
extends java.lang.Object
implements LockTracer

A LockTracer implementation which deals with multiple enter and exit events and tracks the number of locks per thread.

Author:
Paul

Constructor Summary
LockTracerImpl(LockContextListener listener)
           
 
Method Summary
 void beginLock(java.lang.Object source, java.lang.Object lock)
          If no locks exist then tracks one, otherwise increase the internal count.
 boolean currentTreadHasAnyLock()
          Determines if the current thread has a lock at all.
 void endLock(java.lang.Object source, java.lang.Object lock)
          Removes a lock, if zero removes the presence of a lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockTracerImpl

public LockTracerImpl(LockContextListener listener)
Method Detail

beginLock

public void beginLock(java.lang.Object source,
                      java.lang.Object lock)
Description copied from interface: LockTracer
If no locks exist then tracks one, otherwise increase the internal count.

Specified by:
beginLock in interface LockTracer

endLock

public void endLock(java.lang.Object source,
                    java.lang.Object lock)
Description copied from interface: LockTracer
Removes a lock, if zero removes the presence of a lock.

Specified by:
endLock in interface LockTracer

currentTreadHasAnyLock

public boolean currentTreadHasAnyLock()
Description copied from interface: LockTracer
Determines if the current thread has a lock at all.

Specified by:
currentTreadHasAnyLock in interface LockTracer
Returns:


Copyright © 2009. All Rights Reserved.