* @param key The key to lock
* @param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.
*/
public void writeLock(EntityKey key, int timeout) {
ReadWriteLock lock = getLock( key );
Lock writeLock = lock.writeLock();
acquireLock( key, timeout, writeLock );
}
/**
* Acquires a read lock on a specific key.