| jdbm.helper.TestCachePolicy
All known Subclasses: jdbm.helper.TestMRU, jdbm.helper.TestSoftCache,
TestCachePolicy | protected TestCachePolicy(String string)(Code) | | |
causeEviction | protected void causeEviction(CachePolicy cache, int capacity) throws CacheEvictionException(Code) | | Causes at least one eviction from the specified cache.
Note: take care when overriding this with implementations that depend
on adding a temporary listener to the cache. Such a scheme can cause
an infinite loop when testing adding and removing listeners.
Parameters: cache - a cache object. It is generally safe to assume that thiswas created using TestCachePolicy.createInstance(int). Parameters: capacity - the capacity used when cache was created. throws: CacheEvictionException - |
causeGarbageCollection | protected void causeGarbageCollection()(Code) | | |
createInstance | abstract protected CachePolicy createInstance(int capacity)(Code) | | Factory that test methods use to create test instances. The instance
should be capable of storing the specified number of large objects
without an eviction. Large objects are created by
TestCachePolicy.createLargeObject() .
Parameters: capacity - the number of large objects the instance should becapable of containing. a non-null cache instance. |
|
|