com.googlecode.fascinator.common
Class DummyFileLock

java.lang.Object
  extended by com.googlecode.fascinator.common.DummyFileLock

public class DummyFileLock
extends Object

A basic file lock against a local file. For practical purposes it's often best to do logic checking against a seperate '.lock' file so that other code (such as a properties parser) doesn't get mixed up with a lock on your 'real' file.

Author:
Greg Pendlebury

Constructor Summary
DummyFileLock(String new_file)
          Creates a new lock against the file provided.
 
Method Summary
 void getLock()
          Get Lock status of a file
 void release()
          Release lock of the file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyFileLock

public DummyFileLock(String new_file)
              throws IOException
Creates a new lock against the file provided.

Throws:
IOException
Method Detail

getLock

public void getLock()
             throws IOException
Get Lock status of a file

Throws:
IOException

release

public void release()
             throws IOException
Release lock of the file

Throws:
IOException - if File not found


Copyright © 2009-2012. All Rights Reserved.