public class FileLockerImpl extends Object implements FileLocker
Constructor and Description |
---|
FileLockerImpl(File file,
org.eclipse.osgi.service.datalocation.Location anyLocation) |
Modifier and Type | Method and Description |
---|---|
boolean |
isLocked()
Whether the file associated with this locker object is currently locked (by this process or
any other process).
|
void |
lock()
Equivalent to {
FileLocker.lock(long) with a timeout argument of 10000 milliseconds. |
void |
lock(long timeout)
Attempt to lock the file associated with this locker object.
|
void |
release()
Release the lock if acquired.
|
public FileLockerImpl(File file, org.eclipse.osgi.service.datalocation.Location anyLocation)
public void lock()
FileLocker
FileLocker.lock(long)
with a timeout argument of 10000 milliseconds.lock
in interface FileLocker
public void lock(long timeout)
FileLocker
lock
in interface FileLocker
timeout
- timeout in millisecondspublic void release()
FileLocker
release
in interface FileLocker
public boolean isLocked()
FileLocker
isLocked
in interface FileLocker
Copyright © 2008–2014 Eclipse Foundation. All rights reserved.