Home > Contents > Index >
Expanded TOC   |    Accordion TOC   |    Annotated TOC   |    Index

 

Utilities.lockFile

Locks a file for exclusive use by this thread.

Syntax

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() and unlockFile() provide a semaphore primitive that is useful in a cluster environment.

Returns

Boolean indicating success or failure.

See Also

unlockFile

 

  Home > Contents > Index >

FatWire JAVA Reference
Copyright 2005 by FatWire Software
All rights reserved.