net.wotonomy.foundation
Class NSLock

java.lang.Object
  extended by EDU.oswego.cs.dl.util.concurrent.Mutex
      extended by net.wotonomy.foundation.NSLock
All Implemented Interfaces:
EDU.oswego.cs.dl.util.concurrent.Sync, NSLocking

public class NSLock
extends EDU.oswego.cs.dl.util.concurrent.Mutex
implements NSLocking

A simple mutually-exclusive lock. Currently an API-compliance subclass of an external Mutex class, conforming to the API and behavior of com.webobjects.foundation.NSLock. This class implements the NSLocking protocol (interface), and is implemented using Doug Lea's concurrent programming package.

Version:
$Revision: 893 $
Author:
cgruber@israfil.net, $Author: cgruber $

Field Summary
 
Fields inherited from class EDU.oswego.cs.dl.util.concurrent.Mutex
inuse_
 
Fields inherited from interface net.wotonomy.foundation.NSLocking
OneCentury, OneDay, OneHour, OneMinute, OneSecond, OneWeek, OneYear
 
Fields inherited from interface EDU.oswego.cs.dl.util.concurrent.Sync
ONE_CENTURY, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, ONE_YEAR
 
Constructor Summary
NSLock()
           
 
Method Summary
 boolean isLocked()
           
 void lock()
           
 java.lang.String toString()
           
 boolean tryLock()
           
 boolean tryLock(long l)
           
 boolean tryLock(NSTimestamp nstimestamp)
           
 void unlock()
           
 
Methods inherited from class EDU.oswego.cs.dl.util.concurrent.Mutex
acquire, attempt, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NSLock

public NSLock()
Method Detail

lock

public void lock()
Specified by:
lock in interface NSLocking

unlock

public void unlock()
Specified by:
unlock in interface NSLocking

tryLock

public boolean tryLock()

tryLock

public boolean tryLock(long l)

tryLock

public boolean tryLock(NSTimestamp nstimestamp)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isLocked

public boolean isLocked()


Copyright © 2006 null. All Rights Reserved.