org.aspectbench.tm.runtime.internal
Class Lock

java.lang.Object
  extended by org.aspectbench.tm.runtime.internal.Lock

public class Lock
extends java.lang.Object


Field Summary
protected  java.lang.Thread owner
           
 
Constructor Summary
Lock()
           
 
Method Summary
 void get()
          Get the lock and record the current thread as the owner it.
 boolean own()
          Returns true iff the current thread owns the lock.
 void release()
          Release the lock if the current thread owns it, otherwise do nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

protected java.lang.Thread owner
Constructor Detail

Lock

public Lock()
Method Detail

get

public void get()
Get the lock and record the current thread as the owner it.


own

public boolean own()
Returns true iff the current thread owns the lock.


release

public void release()
Release the lock if the current thread owns it, otherwise do nothing.