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 ClassesModifier and TypeInterfaceDescriptionstatic class
Deprecated.Unused. -
Method Summary
Modifier and TypeMethodDescriptionObtain a reentrant read/write lock for the resource at the provided path.lockForRead
(String path) Deprecated.Unused.lockForWrite
(String path) Deprecated.Unused.void
unlockForRead
(WebResourceLockSet.ResourceLock resourceLock) Deprecated.Unused.void
unlockForWrite
(WebResourceLockSet.ResourceLock resourceLock) Deprecated.Unused.
-
Method Details
-
getLock
Obtain a reentrant read/write lock for the resource at the provided path. The resource is not required to exist. Multiple calls to this method with the same path will return the same lock provided that at least one instance of the lock remains in use between the calls.- Parameters:
path
- The path for which the lock should be obtained- Returns:
- A reentrant read/write lock for the given resource.
-
lockForRead
Deprecated.Unused. Will be removed in Tomcat 12 onwards. Use#getLock(String)
instead.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
Deprecated.Unused. Will be removed in Tomcat 12 onwards. Use#getLock(String)
instead.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
Deprecated.Unused. Will be removed in Tomcat 12 onwards. Use#getLock(String)
instead.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
Deprecated.Unused. Will be removed in Tomcat 12 onwards. Use#getLock(String)
instead.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
-