public final static boolean isLocked ( final String path ) { boolean locked = true ; try { LockFile lockFile = LockFile . newLockFile ( path ) ; lockFile . checkHeartbeat ( false ) ; locked = false ; } catch ( Exception e ) { } return locked ; }
Retrieves whether there is potentially already a cooperative lock operating system lock or some other situation preventing a cooperative lock condition from being aquired using the specified path .