Interface WebResourceLockSet
- All Known Implementing Classes:
DirResourceSet
public interface WebResourceLockSet
Interface implemented by
WebResourceSet implementations that wish to provide locking functionality.-
Nested Class Summary
Nested Classes -
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.voidunlockForRead(WebResourceLockSet.ResourceLock resourceLock) Release a read lock from the resource associated with the givenWebResourceLockSet.ResourceLock.voidunlockForWrite(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.ResourceLockthat 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.ResourceLockassociated 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.ResourceLockthat 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.ResourceLockassociated with the resource for which the write lock should be released
-