| 构造器和说明 |
|---|
FileLock(TraceSystem traceSystem,
String fileName,
int sleep)
Create a new file locking object.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static FileLockMethod |
getFileLockMethod(String method)
Get the file locking method type given a method name.
|
String |
getUniqueId() |
Properties |
load()
Load the properties file.
|
void |
lock(FileLockMethod fileLockMethod)
Lock the file if possible.
|
void |
run() |
Properties |
save()
Save the lock file.
|
void |
setProperty(String key,
String value)
Add or change a setting to the properties.
|
void |
unlock()
Unlock the file.
|
public FileLock(TraceSystem traceSystem, String fileName, int sleep)
traceSystem - the trace system to usefileName - the file namesleep - the number of milliseconds to sleeppublic void lock(FileLockMethod fileLockMethod)
fileLockMethod - the file locking method to useDbException - if locking was not successfulpublic void unlock()
public void setProperty(String key, String value)
key - the keyvalue - the valuepublic Properties save()
public Properties load()
public static FileLockMethod getFileLockMethod(String method)
method - the method nameDbException - if the method name is unknownpublic String getUniqueId()
Copyright © 2022. All rights reserved.