1 package org.sourceforge.jemm.client.events; 2 3 /** 4 * Tracks all locks for the current thread. 5 * 6 * 7 * @author Paul 8 * 9 */ 10 public interface LockTracer { 11 /** 12 * If no locks exist then tracks one, otherwise increase the internal count. 13 */ 14 void beginLock(Object source, Object lock); 15 16 /** 17 * Removes a lock, if zero removes the presence of a lock. 18 */ 19 void endLock(Object source, Object lock); 20 21 /** 22 * Determines if the current thread has a lock at all. 23 * @return 24 */ 25 boolean currentTreadHasAnyLock(); 26 }