Package generic.util
Class FileLocker
- java.lang.Object
-
- generic.util.FileLocker
-
- Direct Known Subclasses:
ChannelLocker
public class FileLocker extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Properties
createdLockProperties
protected java.util.Properties
existingLockProperties
protected java.lang.String
existingLockType
protected boolean
isLocked
protected java.io.File
lockFile
-
Constructor Summary
Constructors Modifier Constructor Description protected
FileLocker(java.io.File lockFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canForceLock()
protected boolean
createLockFile()
boolean
forceLock()
java.lang.String
getExistingLockFileInformation()
protected java.lang.String
getLockType()
boolean
isLocked()
boolean
lock()
void
release()
java.lang.String
toString()
-
-
-
Field Detail
-
lockFile
protected final java.io.File lockFile
-
existingLockProperties
protected final java.util.Properties existingLockProperties
-
createdLockProperties
protected java.util.Properties createdLockProperties
-
existingLockType
protected final java.lang.String existingLockType
-
isLocked
protected boolean isLocked
-
-
Method Detail
-
lock
public boolean lock()
-
isLocked
public boolean isLocked()
-
release
public void release()
-
canForceLock
public boolean canForceLock()
-
forceLock
public boolean forceLock()
-
getExistingLockFileInformation
public java.lang.String getExistingLockFileInformation()
-
getLockType
protected java.lang.String getLockType()
-
createLockFile
protected boolean createLockFile()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-