Interface WebResourceLockSet
- All Known Implementing Classes:
DirResourceSet
public interface WebResourceLockSet
Interface implemented by
WebResourceSet
implementations that wish to provide locking functionality.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionlockForRead
(String path) Lock the resource at the provided path for reading.lockForWrite
(String path) Lock the resource at the provided path for writing.void
unlockForRead
(WebResourceLockSet.ResourceLock resourceLock) Release a read lock from the resource associated with the givenWebResourceLockSet.ResourceLock
.void
unlockForWrite
(WebResourceLockSet.ResourceLock resourceLock) Release the write lock from the resource associated with the givenWebResourceLockSet.ResourceLock
.
-
Method Details
-
lockForRead
Lock the resource at the provided path for reading. The resource is not required to exist. Read locks are not exclusive.- Parameters:
path
- The path to the resource to be locked for reading- Returns:
- The
WebResourceLockSet.ResourceLock
that must be passed tounlockForRead(ResourceLock)
to release the lock
-
unlockForRead
Release a read lock from the resource associated with the givenWebResourceLockSet.ResourceLock
.- Parameters:
resourceLock
- TheWebResourceLockSet.ResourceLock
associated with the resource for which a read lock should be released
-
lockForWrite
Lock the resource at the provided path for writing. The resource is not required to exist. Write locks are exclusive.- Parameters:
path
- The path to the resource to be locked for writing- Returns:
- The
WebResourceLockSet.ResourceLock
that must be passed tounlockForWrite(ResourceLock)
to release the lock
-
unlockForWrite
Release the write lock from the resource associated with the givenWebResourceLockSet.ResourceLock
.- Parameters:
resourceLock
- TheWebResourceLockSet.ResourceLock
associated with the resource for which the write lock should be released
-