| Constructor and Description |
|---|
URLPathLock(URL url,
org.mule.runtime.api.lock.LockFactory lockFactory)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isLocked() |
void |
release()
Releases the lock that was previously obtained by invoking
PathLock.tryLock() on this instance with a true
return value. |
boolean |
tryLock()
Attempts to obtain a lock on the referenced path.
|
public URLPathLock(URL url, org.mule.runtime.api.lock.LockFactory lockFactory)
url - the URL from which the lock's key is to be extractedlockFactory - a LockFactorypublic boolean tryLock()
Just like with any locking API, any component invoking this method on this and obtaining true as a return
value MUST make sure that the PathLock.release() method is eventually invoked on this same instance.
public boolean isLocked()
public void release()
PathLock.tryLock() on this instance with a true
return value.
This method will not fail if no such lock was ever obtained or has already been released.
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.