Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 828
نمايش فراداده

ReadWriteLockjava.util.concurrent.locks

Java 5.0

This interface represents a pair of Lock objects with special locking behavior that is useful for concurrent algorithms in which reader threads frequently access a data structure and writer threads only infrequently modify the structure. The Lock returned by readLock( ) may be locked by multiple threads at the same time as long as no thread has the writeLock( ) locked. See ReentrantReadWriteLock for a concrete implementation with implementation-specific locking details.

public interface

ReadWriteLock { // Public Instance Methods Lock

readLock ( ); Lock

writeLock ( ); }

Implementations

ReentrantReadWriteLock