uk.ac.vamsas.client.simpleclient
Class LockFactory

java.lang.Object
  extended byuk.ac.vamsas.client.simpleclient.LockFactory

public class LockFactory
extends java.lang.Object


Field Summary
static int locktype
           
static java.lang.String[] locktypes
           
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
LockFactory()
           
 
Method Summary
static Lock getLock(java.io.File target)
          lock target (blocks until lock is obtained)
static Lock getLock(java.io.File target, boolean block)
           
static Lock tryLock(java.io.File target)
          try to lock target
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

locktype

public static int locktype

locktypes

public static java.lang.String[] locktypes
Constructor Detail

LockFactory

public LockFactory()
Method Detail

getLock

public static Lock getLock(java.io.File target)
lock target (blocks until lock is obtained)

Parameters:
target -
Returns:
lock

getLock

public static Lock getLock(java.io.File target,
                           boolean block)

tryLock

public static Lock tryLock(java.io.File target)
try to lock target

Parameters:
target -
Returns:
null if lock was not possible