com.objectwave.transactionalSupport
Class ExpandingObjectModifiedCache

java.lang.Object
  |
  +--com.objectwave.transactionalSupport.ExpandingObjectModifiedCache

public class ExpandingObjectModifiedCache
extends java.lang.Object

Maintain a collection of ObjectModified objects. There is a cache per thread. This elminates the need to have synchronized checkin and check out for getting and returning cached objects. Of course, this could pose a problem if one thread checks out objects, and the other returns objects. If that is your situation, an instance of this class must be managed by your application and not via the static methods in this class.

Version:
1.1
Author:
Craig Murphy, Dave Hoag

Constructor Summary
ExpandingObjectModifiedCache()
          Initialize this instance to be ready to cache Objects.
 
Method Summary
static ObjectModified getObjectModifiedFromCache()
          The entry point to the instance related to the current thread, and to get the cached object.
 ObjectModified getObjectModifiedFromCacheWork()
          Get the cached object from this instance of ExpandingObjectModifiedCache.
static void returnObjectModifiedToCache(ObjectModified value)
          The intended entry point for returning instances.
 void returnObjectModifiedToCacheWork(ObjectModified value)
          Return a checked out instance to this cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpandingObjectModifiedCache

public ExpandingObjectModifiedCache()
Initialize this instance to be ready to cache Objects.

Method Detail

getObjectModifiedFromCache

public static ObjectModified getObjectModifiedFromCache()
The entry point to the instance related to the current thread, and to get the cached object.


returnObjectModifiedToCache

public static final void returnObjectModifiedToCache(ObjectModified value)
The intended entry point for returning instances.


getObjectModifiedFromCacheWork

public ObjectModified getObjectModifiedFromCacheWork()
Get the cached object from this instance of ExpandingObjectModifiedCache.


returnObjectModifiedToCacheWork

public void returnObjectModifiedToCacheWork(ObjectModified value)
Return a checked out instance to this cache.

Parameters:
value - ObjectModifed - Hopefully and instance that was obtained via the getObjectModifiedCacheWork method.