Record Class PathLock

java.lang.Object
java.lang.Record
org.cryptomator.frontend.fuse.locks.PathLock
Record Components:
pathComponents - The path, split into path components
parent - The corresponding path lock for the parent path
rwLock - The read-write-lock. We need to store a strong reference while in use, because LockManager works with weeak references
lock - Either the rwLock's read or its write lock
dataLockSupplier - A supplier for a separate ReadWriteLock (not rwLock) to be used during lockDataForReading() and lockDataForWriting()
All Implemented Interfaces:
AutoCloseable

public record PathLock(@Unmodifiable List<String> pathComponents, @Nullable PathLock parent, ReadWriteLock rwLock, Lock lock, Supplier<ReadWriteLock> dataLockSupplier) extends Record implements AutoCloseable
A path lock, either for reading (shared) or writing (exclusive).