IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.cs.invoker.cache
Class BeanInvokerCache

java.lang.Object
  extended bycom.ibm.btt.cs.invoker.cache.BeanInvokerCache
All Implemented Interfaces:
InvokerCache

public class BeanInvokerCache
extends java.lang.Object
implements InvokerCache

The Bean Invoker Pool function will be implemented by Bean Invoker Pattern itself. The purpose of object pooling is to improve performance with caching. Bean Invokers are stored into a pool. Along with each Bean Invoker is a request ID. When an object is returned from the pool, it should be removed so that it will not be returned for another request again. Objects should be released back to the pool after each request. If a Bean Invoker is available for a given request, the Bean Invoker Factory returns the Invoker and removes it from pool; if not, the Bean Invoker Factory will create one instead.

Caching should be optional and a configuration point should be available. If caching is offline, every access to the Bean Invoker Factory will result in a Bean Invoker creation. After the usage of a Bean Invoker is completed, it is returned to the Bean Invoker Factory and put the invoker into pool.

Before the factory returns a Bean Invoker, a corresponding Bean Proxy should be retrieve form the Bean Proxy cache and set into the Bean Invoker.


Constructor Summary
BeanInvokerCache()
           
 
Method Summary
 void clear()
          Clear data before set into cache
 void clear(java.lang.String requestID)
          Clear data according to SessionID
 BeanInvoker createBeanInvokerFromCache(java.lang.String requestID)
          If a Bean Invoker is available for a given request, the Bean Invoker Factory returns the Invoker and removes it from pool;
 void putBeanInvokerIntoCache(BeanInvoker beanInvoker)
          Put the BeanInvoker into pool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanInvokerCache

public BeanInvokerCache()
Method Detail

createBeanInvokerFromCache

public BeanInvoker createBeanInvokerFromCache(java.lang.String requestID)
If a Bean Invoker is available for a given request, the Bean Invoker Factory returns the Invoker and removes it from pool;

Parameters:
requestID - used to locate the BeanInvoker object
Returns:
BeanInvoker BeanInvoker Object

putBeanInvokerIntoCache

public void putBeanInvokerIntoCache(BeanInvoker beanInvoker)
Put the BeanInvoker into pool

Parameters:
beanInvoker - BeanInvoker Object

clear

public void clear()
Description copied from interface: InvokerCache
Clear data before set into cache

Specified by:
clear in interface InvokerCache
See Also:
InvokerCache.clear()

clear

public void clear(java.lang.String requestID)
Description copied from interface: InvokerCache
Clear data according to SessionID

Specified by:
clear in interface InvokerCache

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005