ca.odell.glazedlists.util.concurrent

Interface Lock

Known Implementing Classes:
J2SE14ReadWriteLock.ReadLock, J2SE14ReadWriteLock.WriteLock, WriterPreferenceReadWriteLock.ReaderLock, WriterPreferenceReadWriteLock.WriterLock

public interface Lock

A lock is a tool for controlling access to a shared resource by multiple threads.

This interface is a back-port of the java.util.concurrent.locks.Lock class that first appeared in J2SE 1.5. Due to a requirement for sophisticated concurrency, this interface has been back-ported for use in J2SE 1.4 (and greater). It shares similar method signatures to be consistent with the J2SE 1.5 API.

Author:
Jesse Wilson
See Also:
java.util.concurrent.locks.Lock, Lock

Method Summary

void
lock()
Acquires the lock.
boolean
tryLock()
Acquires the lock only if it is free at the time of invocation.
void
unlock()
Releases the lock.

Method Details

lock

public void lock()
Acquires the lock.

tryLock

public boolean tryLock()
Acquires the lock only if it is free at the time of invocation.

unlock

public void unlock()
Releases the lock.

Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2009-07-14 22:05