com.googlecode.fascinator.common
Class DummyFileLock

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

public class DummyFileLock
extends java.lang.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(java.lang.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(java.lang.String new_file)
              throws java.io.IOException
Creates a new lock against the file provided.

Throws:
java.io.IOException
Method Detail

getLock

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

Throws:
java.io.IOException

release

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

Throws:
java.io.IOException - if File not found


Copyright © 2009-2013. All Rights Reserved.