obtainLock
Acquires and returns a Lock for a file with the given name.
Parameters
name
the name of the lock file
Throws
(optional specific exception) if the lock could not be obtained because it is currently held elsewhere.
IOException
if any i/o error occurs attempting to gain the lock