Implements a mutual exclusive file lock strategy to prevent two or more JVMs/process to access the same file or resource NOTE: it should NOT be used to synchronise concurrent from different threads in the same JVM
| Type | Name and description |
|---|---|
long |
delayMillis |
java.lang.String |
errorMessage |
java.io.File |
target |
Duration |
timeout |
java.lang.String |
waitMessage |
| Type Params | Return Type | Name and description |
|---|---|---|
<T> |
T |
lock(groovy.lang.Closure<T> closure) |
|
FileMutex |
setErrorMessage(java.lang.String str) |
|
FileMutex |
setTimeout(java.lang.Object value) |
|
FileMutex |
setWaitMessage(java.lang.String str) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Groovy Documentation