Class DecoratorReadWriteLockCollection<E>

java.lang.Object
com.globalmentor.collections.ReadWriteLockDecorator
com.globalmentor.collections.DecoratorReadWriteLockCollection<E>
Type Parameters:
E - The type of elements in the collection.
All Implemented Interfaces:
ReadWriteLockCollection<E>, Iterable<E>, Collection<E>, ReadWriteLock
Direct Known Subclasses:
DecoratorReadWriteLockSet

public class DecoratorReadWriteLockCollection<E> extends ReadWriteLockDecorator implements ReadWriteLockCollection<E>
A thread-safe collection decorator that allows many readers but only one writer to access a collection at a time. For operations that iterate over live collection data, a read or write lock should be acquired before the call to acquire the data and held until the data is consumed.
Author:
Garret Wilson