# Class: com.pnfsoftware.jeb.util.io.FileMonitor

File monitors can be used to create and retrieve lock on a file for exclusive operations. Locks are implemented as small files alongside the file to be locked.

## Static Field: CHECK_MS
Type: `long`

Constant value: `3000`
Description: Check frequency in ms, that is, the frequency at which a lock\-file write\-timestamp is verified.

## Static Field: TOUCH_MS
Type: `long`

Constant value: `1000`
Description: Touch frequency in ms, that is, the frequency at which a lock\-file write\-timestamp is updated.

## Method: isLocked
- return type: `boolean`

Description: 
return: true if a valid lock file \(per this monitor settings\) exists and is recent enough to         be valid

## Method: lock

Description: Create and refresh a valid lock file \(per this monitor setting\). This call should be mirrored by a call to [#unlock()](#unlock()) when monitoring is to stop.

## Method: unlock
- parameter: `unregister`, type: `boolean`

Description: 
parameter: unregister: 
throws: 

## Static Method: create
- parameter: `file`, type: `java.io.File`
- return type: `com.pnfsoftware.jeb.util.io.FileMonitor`

Description: Create a monitor object for the provided file. \(Note that this method does not create any file.\)
parameter: file: 
return: 
throws: 

## Static Method: create
- parameter: `folder`, type: `java.io.File`
- parameter: `filename`, type: `java.lang.String`
- parameter: `singlefile`, type: `boolean`
- return type: `com.pnfsoftware.jeb.util.io.FileMonitor`

Description: Create a monitor object for the provided file or group of files. \(Note that this method does not create any file.\)
parameter: folder: 
parameter: filename: 
parameter: singlefile: 
return: 
throws: 

## Static Method: get
- parameter: `file`, type: `java.io.File`
- return type: `com.pnfsoftware.jeb.util.io.FileMonitor`

Description: Retrieve the existing monitor for the provided file.
parameter: file: 
return: 
throws: 

## Static Method: get
- parameter: `folder`, type: `java.io.File`
- parameter: `filename`, type: `java.lang.String`
- parameter: `singlefile`, type: `boolean`
- return type: `com.pnfsoftware.jeb.util.io.FileMonitor`

Description: Retrieve the existing monitor for the provided file or group of files.
parameter: folder: 
parameter: filename: 
parameter: singlefile: 
return: 
throws: 

