org.jwarp.service.cache.test
Class CacheTest

java.lang.Object
  |
  +--org.jwarp.service.cache.test.CacheTest

public class CacheTest
extends java.lang.Object

This is the cache test class. There are several settings to be combined and so several possibilities of behaviour. This class tests the most important settings. Also unrealistic settings are tested.


Inner Class Summary
(package private)  class CacheTest.AccessThread
          Thread simulating the access to a cache.
 
Constructor Summary
CacheTest()
          Construct a new CacheTest.
 
Method Summary
static void main(java.lang.String[] args)
          Main method.
 void testCache()
          This method does test the cache.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheTest

public CacheTest()
Construct a new CacheTest.
Method Detail

main

public static void main(java.lang.String[] args)
Main method. It creates a new test instance and calls the test method.
Parameters:
args - The command line args (actually none supported)

testCache

public void testCache()
This method does test the cache. The several settings are changed within nested loops. They are nested as follows:
1 updatePeriod (from 1000 to 13000 ms, step 6000 -> 3 cases)
2 sensibility (from 1 to 5, step 3 -> 3 cases)
3 maxTime (from -1 to 4000, step 2000 -> 3 cases)
4 minAccess (from -1 to 30, step 10 -> 3 cases)
5 maxComps (from -1 to 3000, step 1000 -> 3 cases)

Each test case is printed out to System.out followed by the caches update statistics. All values used here are divided by a factor of 5 to the values probably be realistic for a running cache thus providing a faster test (we're running more than 200 tests here...).


©   O R C A   S y s t e m s