TestBox 2.4.0

testbox.system.compat.framework
Class RemoteFacadeObjectCache

railo-context.Component
        extended by testbox.system.compat.framework.RemoteFacadeObjectCache

public class RemoteFacadeObjectCache
extends railo-context.Component

Mechanism for managing a cache of objects. This is nice to have since the remote facade runs its tests method-at-a-time. Without a cache, you'd incur all the overhead of constructing the Test object(s) multiple times, which is not ideal.


Method Summary
 string endTestRun(string TestRunKey)
          ensures proper cleanup
 any getObject(String componentName, string TestRunKey)
 struct getSuitePool()
          returns the pool struct
 numeric getSuitePoolCount()
          returns the number of TestRun items in the pool
 struct initializeSuitePool()
private any initializeTestRunCache(string TestRunKey)
 numeric purgeStaleTests([numeric NumMinutes='10'])
          cleans up long-running tests
 numeric PurgeSuitePool()
 string startTestRun()
 
Methods inherited from class railo-context.Component
 

Method Detail

endTestRun

public string endTestRun(string TestRunKey)
ensures proper cleanup

Parameters:
TestRunKey - the key returned from startTestRun; used for managing the pool of components

getObject

public any getObject(String componentName, string TestRunKey)

Parameters:
componentName
TestRunKey - the key returned from startTestRun; used for managing the pool of components

getSuitePool

public struct getSuitePool()
returns the pool struct


getSuitePoolCount

public numeric getSuitePoolCount()
returns the number of TestRun items in the pool


initializeSuitePool

public struct initializeSuitePool()


initializeTestRunCache

private any initializeTestRunCache(string TestRunKey)

Parameters:
TestRunKey - the key returned from startTestRun; used for managing the pool of components

purgeStaleTests

public numeric purgeStaleTests([numeric NumMinutes='10'])
cleans up long-running tests. This is simply overwrought prudence to ensure that very anomalous behavior doesn't result in a build-up of cruft in the server scope. The remote facade is designed to run start, execute, and cleanup independently of one another precisely to prevent catastrophic test errors from leaving a dirty cache. But one never knows what might happen

Parameters:
NumMinutes - Number of minutes a TestRun (which comprises multiple objects potentially) can remain in the cache after its LastAccessed value

PurgeSuitePool

public numeric PurgeSuitePool()


startTestRun

public string startTestRun()


TestBox 2.4.0