com.ibm.portal.resolver.cache
Interface CacheFactory

All Known Subinterfaces:
CorPocServiceHome, PocServiceHome, PortalPocServiceHome, PortletPocServiceHome

public interface CacheFactory

Factory that can be used to access caches in form of the CachedDataSourceFactory interface. The returned CachedDataSourceFactory uses the supplied callback to instantiate DataSource objects in case of a cache miss. The factory uses the class object of the callback to identify cache instances.

Since:
7.0

Method Summary
<T> CachedDataSourceFactory<T>
getCachedDataSourceFactory(CachedDataSourceFactory.Callback<T> aCallback, java.lang.Boolean bCached)
          Returns either a new or existing instance of the cache.
<T> CachedDataSourceFactory<T>
getCachedDataSourceFactory(java.lang.Class<? extends CachedDataSourceFactory.Callback<T>> aClass, java.lang.Boolean bCached)
          Returns an existing instance of the cache.
 

Method Detail

getCachedDataSourceFactory

<T> CachedDataSourceFactory<T> getCachedDataSourceFactory(CachedDataSourceFactory.Callback<T> aCallback,
                                                          java.lang.Boolean bCached)
Returns either a new or existing instance of the cache. If the cache does not exist, it is created on the basis of the provided callback.

Parameters:
aCallback - the callback function
bCached - indicates if the method should return a CachedDataSourceFactory that uses an internal cache
Returns:
the factory, not null

getCachedDataSourceFactory

<T> CachedDataSourceFactory<T> getCachedDataSourceFactory(java.lang.Class<? extends CachedDataSourceFactory.Callback<T>> aClass,
                                                          java.lang.Boolean bCached)
Returns an existing instance of the cache. If the instance does not exist, the method returns null.

Parameters:
aClass - class object representing the cache
bCached - indicates if the method should return a CachedDataSourceFactory that uses an internal cache
Returns:
the factory or null