Package jadex.commons.collection
Class RwAutoLock
- java.lang.Object
- 
- jadex.commons.collection.RwAutoLock
 
- 
 public class RwAutoLock extends java.lang.ObjectClass wrapping a read-write lock mechanism that can be used with try-with-resources.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IAutoLockreadunlockThe resource read unlock.protected java.util.concurrent.locks.ReadWriteLockrwlockThe internal lock.protected IAutoLockwriteunlockThe resource write unlock.
 - 
Constructor SummaryConstructors Constructor Description RwAutoLock()Creates the auto-lock.RwAutoLock(java.util.concurrent.locks.ReadWriteLock lock)Creates the auto-lock.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.locks.ReadWriteLockgetLock()Gets the internal lock.java.util.concurrent.locks.LockgetReadLock()Gets the read lock for manual locking.java.util.concurrent.locks.LockgetWriteLock()Gets the write lock for manual locking.IAutoLockreadLock()Locks the read lock for resource-based locking.IAutoLockwriteLock()Locks the write lock for resource-based locking.
 
- 
- 
- 
Method Detail- 
readLockpublic IAutoLock readLock() Locks the read lock for resource-based locking.
 - 
writeLockpublic IAutoLock writeLock() Locks the write lock for resource-based locking.
 - 
getReadLockpublic java.util.concurrent.locks.Lock getReadLock() Gets the read lock for manual locking.
 - 
getWriteLockpublic java.util.concurrent.locks.Lock getWriteLock() Gets the write lock for manual locking.
 - 
getLockpublic java.util.concurrent.locks.ReadWriteLock getLock() Gets the internal lock.- Returns:
- The lock.
 
 
- 
 
-