com.objectwave.utility
Class LockManager

java.lang.Object
  |
  +--com.objectwave.utility.LockManager

public class LockManager
extends java.lang.Object

A simple implementation of a LockManager.

Version:
$Id: LockManager.java,v 2.0 2001/06/11 15:46:53 dave_hoag Exp $
Author:
Dave Hoag

Constructor Summary
LockManager()
          LockManager default constructor
 
Method Summary
 void acquireLocks(java.util.List listToLock)
          Acquire locks for all of the objects in the List, or none of them.
 void lock(java.lang.Object objectToLock)
          Lock a single object
 void release(java.lang.Object objectToUnlock)
          Release a single object
 void releaseLocks(java.util.List listToUnlock)
          Release locks for all objects in a List
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockManager

public LockManager()
LockManager default constructor

Method Detail

lock

public void lock(java.lang.Object objectToLock)
Lock a single object

Parameters:
objectToLock - the object to lock

release

public void release(java.lang.Object objectToUnlock)
Release a single object

Parameters:
objectToUnlock - the object to unlock

acquireLocks

public void acquireLocks(java.util.List listToLock)
Acquire locks for all of the objects in the List, or none of them. Attempt to acquire locks. If we cannot, get in line to try again.

Parameters:
listToLock - list of objects to lock

releaseLocks

public void releaseLocks(java.util.List listToUnlock)
Release locks for all objects in a List

Parameters:
listToUnlock - the objects to unlock