Class ExecLock
java.lang.Object
fr.ens.biologie.genomique.eoulsan.util.locker.ExecLock
- All Implemented Interfaces:
Locker
This class define a lock to prevent execution of a process simultaneously on multiples JVM.
- Since:
- 1.1
- Author:
- Laurent Jourdren
-
Constructor Details
-
ExecLock
Public constructor.- Parameters:
execName- resource nametmpDir- temporary directory where to create lock files
-
ExecLock
Public constructor.- Parameters:
execName- resource name
-
-
Method Details
-
lock
public void lock()Description copied from interface:LockerWait the token and then lock the resource. -
unlock
public void unlock()Description copied from interface:LockerUnlock the resource. -
getProcessesWaiting
public int getProcessesWaiting()Get the number of processes waiting.- Returns:
- the number of process waiting
-