Transfer version 1.1

transfer.com.cache
Class SoftReferenceHandler

WEB-INF.cftags.component
        extended by transfer.com.cache.SoftReferenceHandler
Direct Known Subclasses:
SoftReferenceHandler

public class SoftReferenceHandler
extends WEB-INF.cftags.component

Handles Soft References in Transfer


Constructor Summary
init(CacheConfigManager cacheConfigManager, FacadeFactory facadeFactory)
          Constructor
 
Method Summary
 void clearAllReferences()
          clear and queue all the soft refrences stored in here
private void eachSoftReferenceRegister(any function, [struct args='[runtime expression]'])
          HOF that runs a function against each facade's ConfigManager, if it has one
private void executeClearAllReferences(SoftReferenceRegister softReferenceRegister)
          calls 'clearAllReference' on each of the facades
private void executeReap(SoftReferenceRegister softReferenceRegister, numeric secondLimit)
          executes the reap action on each of the facades
private CacheConfigManager getCacheConfigManager()
private FacadeFactory getFacadeFactory()
private void invokeFacadeSoftReferenceRegister(AbstractBaseFacade facade, any function, struct args)
          invokes the function against the soft reference register if the facade has one
 void reap()
          this has been seperated out, so the cf8 version can do this async
 any register(TransferObject transfer)
          Registers a new TransferObject with the Handler, and returns a java.ref.softReference
private void setCacheConfigManager(CacheConfigManager CacheConfigManager)
private void setFacadeFactory(FacadeFactory FacadeFactory)
private void syncronousReap([numeric secondLimit='0'])
          syncronous Reap: reaps the collected objects out of the pool
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(CacheConfigManager cacheConfigManager, FacadeFactory facadeFactory)
Constructor

Parameters:
cacheConfigManager - The cache config manager
facadeFactory - The facade factpry for getting to the cache
Method Detail

clearAllReferences

public void clearAllReferences()
clear and queue all the soft refrences stored in here


eachSoftReferenceRegister

private void eachSoftReferenceRegister(any function, [struct args='[runtime expression]'])
HOF that runs a function against each facade's ConfigManager, if it has one

Parameters:
function - the function to call on the SoftReferenceRegister
args - the argument data to pass from function call to function call

executeClearAllReferences

private void executeClearAllReferences(SoftReferenceRegister softReferenceRegister)
calls 'clearAllReference' on each of the facades

Parameters:
softReferenceRegister - the soft reference register to call on

executeReap

private void executeReap(SoftReferenceRegister softReferenceRegister, numeric secondLimit)
executes the reap action on each of the facades

Parameters:
softReferenceRegister - the soft reference register to call on
secondLimit - The second limit on reaping, 0 is unlimited

getCacheConfigManager

private CacheConfigManager getCacheConfigManager()


getFacadeFactory

private FacadeFactory getFacadeFactory()


invokeFacadeSoftReferenceRegister

private void invokeFacadeSoftReferenceRegister(AbstractBaseFacade facade, any function, struct args)
invokes the function against the soft reference register if the facade has one

Parameters:
facade - the facade to call against
function - the function to call on the SoftReferenceRegister
args - the argument data to pass from function call to function call

reap

public void reap()
this has been seperated out, so the cf8 version can do this async


register

public any register(TransferObject transfer)
Registers a new TransferObject with the Handler, and returns a java.ref.softReference

Parameters:
transfer - The transfer object

setCacheConfigManager

private void setCacheConfigManager(CacheConfigManager CacheConfigManager)

Parameters:
CacheConfigManager

setFacadeFactory

private void setFacadeFactory(FacadeFactory FacadeFactory)

Parameters:
FacadeFactory

syncronousReap

private void syncronousReap([numeric secondLimit='0'])
syncronous Reap: reaps the collected objects out of the pool

Parameters:
secondLimit - The second limit on reaping, 0 is unlimited

Transfer version 1.1