public class Lock extends Object
Modifier and Type | Field and Description |
---|---|
static long |
LOOP_WAIT_TIME |
Constructor and Description |
---|
Lock(String fileName) |
Lock(String directoryName,
String fileName) |
public static final long LOOP_WAIT_TIME
public Lock(String fileName)
public boolean obtain() throws IOException
IOException
public boolean obtain(long timeout) throws IOException
timeout
- number of milliseconds to wait for (if necessary)IOException
- if an error occurs creating the lockpublic void release()
public boolean isLocked()
public String getLockFilePath()
Copyright © 2002-2015 Atlassian. All Rights Reserved.