org.apache.ojb.otm.lock.map
Class InMemoryLockMap

java.lang.Object
  extended by org.apache.ojb.otm.lock.map.InMemoryLockMap
All Implemented Interfaces:
LockMap

public class InMemoryLockMap
extends Object
implements LockMap

Author:
Raghu Rajah

Field Summary
private  HashMap _locks
           
 
Constructor Summary
InMemoryLockMap()
           
 
Method Summary
 void gc()
          This is "garbage collection" - remove free locks from the map.
 ObjectLock getLock(Identity oid)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_locks

private HashMap _locks
Constructor Detail

InMemoryLockMap

public InMemoryLockMap()
Method Detail

getLock

public ObjectLock getLock(Identity oid)
Specified by:
getLock in interface LockMap
See Also:
LockMap.getLock(Identity)

gc

public void gc()
Description copied from interface: LockMap
This is "garbage collection" - remove free locks from the map. This method is called at the end of each transaction. Maybe that would be better to call it by timer?

Specified by:
gc in interface LockMap

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.