Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
Utilities.lockFile
Locks a file for exclusive use by this thread.
Syntax
public static boolean lockFile(String file)Parameters
file
- Filename to lock. This must be a file specification that is valid for the operating system.
Description
The lockFile method locks a file for exclusive use by this thread.
Don't forget to release the lock. Otherwise, it is held until the virtual machine shuts down.
lockFile()
andunlockFile()
provide a semaphore primitive that is useful in a cluster environment.Returns
Boolean indicating success or failure.
See Also
Home > Contents > Index > ![]()
FatWire JAVA Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.