Package jadex.collection
Interface IRwDataStructure
- All Known Implementing Classes:
RwLinkedListWrapper,RwListWrapper,RwMapWrapper
public interface IRwDataStructure
Interface for thread-safe data structures using a read-write lock.
-
Method Summary
Modifier and TypeMethodDescriptionjadex.common.RwAutoLockGets the internal auto lock.default ReadWriteLockgetLock()Gets the internal lock.default LockGets the read lock for manual locking.default LockGets the write lock for manual locking.default jadex.common.IAutoLockreadLock()Locks the read lock for resource-based locking.default jadex.common.IAutoLockLocks the write lock for resource-based locking.
-
Method Details
-
getAutoLock
jadex.common.RwAutoLock getAutoLock()Gets the internal auto lock.- Returns:
- The lock.
-
readLock
default jadex.common.IAutoLock readLock()Locks the read lock for resource-based locking.- Returns:
- An IAutoLock object for resource-based locking.
-
writeLock
default jadex.common.IAutoLock writeLock()Locks the write lock for resource-based locking.- Returns:
- An IAutoLock object for resource-based locking.
-
getReadLock
Gets the read lock for manual locking.- Returns:
- The read lock.
-
getWriteLock
Gets the write lock for manual locking.- Returns:
- The write lock.
-
getLock
Gets the internal lock.- Returns:
- The lock.
-