com.objectwave.transactionalSupport
Class TransactionManager.MyLockManager

java.lang.Object
  |
  +--com.objectwave.transactionalSupport.TransactionManager.MyLockManager
Enclosing class:
TransactionManager

public static class TransactionManager.MyLockManager
extends java.lang.Object

A very efficient lock manager that takes advantage of the following assumptions. 1. No thread will acquire locks twice. 2. We don't care about 'equals' comparison, just object identity '==' comparisons. 3. The 'object []' containing the objects to lock and unlock will be the same instance.

Version:
$Id: TransactionManager.java,v 2.1 2001/06/15 13:46:33 dave_hoag Exp $
Author:
dhoag

Constructor Summary
TransactionManager.MyLockManager()
          LockManager constructor comment.
 
Method Summary
 void acquireLocks(java.lang.Object[] objectsToLock, int count)
          Aquire locks for all of the objects in the Vector, or none of them.
 void acquireLocksOrig(java.lang.Object[] objectsToLock, int length)
          Deprecated. Redesigned.
protected  boolean isTaken(java.lang.Object[] objectsToLock, int count)
          Is any object in the target list taken
 void releaseLocks(java.lang.Object[] objectsToRelease, int length)
          Aquire locks for all of the objects in the Vector, or none of them.
 void releaseLocksOrig(java.lang.Object[] objectsToRelease, int length)
          Aquire locks for all of the objects in the Vector, or none of them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionManager.MyLockManager

public TransactionManager.MyLockManager()
LockManager constructor comment.

Method Detail

isTaken

protected boolean isTaken(java.lang.Object[] objectsToLock,
                          int count)
Is any object in the target list taken

Parameters:
objectsToLock -
count -
Returns:
The Taken value

acquireLocks

public final void acquireLocks(java.lang.Object[] objectsToLock,
                               int count)
Aquire locks for all of the objects in the Vector, or none of them. Attempt to acquire locks. If we can not, get in line to try again.

Parameters:
objectsToLock -
count -

acquireLocksOrig

public final void acquireLocksOrig(java.lang.Object[] objectsToLock,
                                   int length)
Deprecated. Redesigned.

Aquire locks for all of the objects in the Vector, or none of them. Attempt to acquire locks. If we can not, get in line to try again.

Parameters:
objectsToLock -
length -

releaseLocks

public final void releaseLocks(java.lang.Object[] objectsToRelease,
                               int length)
Aquire locks for all of the objects in the Vector, or none of them.

Parameters:
objectsToRelease -
length -

releaseLocksOrig

public final void releaseLocksOrig(java.lang.Object[] objectsToRelease,
                                   int length)
Aquire locks for all of the objects in the Vector, or none of them.

Parameters:
objectsToRelease -
length -