EDU.oswego.cs.dl.util.concurrent
Class NullSync
public
class
NullSync
extends Object
implements Sync
A No-Op implementation of Sync. Acquire never blocks,
Attempt always succeeds, Release has no effect.
However, acquire and release do detect interruption
and throw InterruptedException. Also, the methods
are synchronized, so preserve memory barrier properties
of Syncs.
NullSyncs can be useful in optimizing classes when
it is found that locking is not strictly necesssary.
[ Introduction to this package. ]
public void acquire()
public boolean attempt(long msecs)
public void release()