|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.rcache.BaseCacheTest
public abstract class BaseCacheTest
Base class for deriving other test-cases.
| Constructor Summary | |
|---|---|
BaseCacheTest()
|
|
| Method Summary | |
|---|---|
protected void |
check(double[] a1,
double[] a2)
Tests two arrays for equality. |
protected void |
check(long[] a1,
long[] a2)
Tests two arrays for equality. |
protected abstract BaseCache<java.lang.Integer,java.lang.Object> |
createCache()
Creates a cache instance. |
protected abstract BaseCache<java.lang.Integer,java.lang.Object> |
createCache(int capacity)
Creates a cache instance. |
protected abstract BaseCache<java.lang.Integer,java.lang.Object> |
createCache(int capacity,
float factor)
Creates a cache instance. |
protected abstract BaseCache<java.lang.Integer,java.lang.Object> |
createCache(int capacity,
float factor,
int level)
Creates a cache instance. |
protected void |
forcePurge()
Utility method that forces caches to be purged by demanding a huge amount of memory. |
void |
testGet()
Test for Cache.get(Object). |
void |
testObjectMethods()
Test for some methods inherited from Object. |
void |
testProfiler()
Test for CacheProfiler. |
void |
testPurge()
Tests that the cache has the correct number of items after a purge(). |
void |
testRemove()
Test for Cache.remove(Object). |
void |
testRemoveAndPut()
Tests that the following sequence: cache.put(key, x) cache.remove(key) cache.put(key, y) Is safe. |
void |
testUnsupported()
Test for unsupported methods in BaseCache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseCacheTest()
| Method Detail |
|---|
protected abstract BaseCache<java.lang.Integer,java.lang.Object> createCache()
protected abstract BaseCache<java.lang.Integer,java.lang.Object> createCache(int capacity)
capacity - Initial capacity
protected abstract BaseCache<java.lang.Integer,java.lang.Object> createCache(int capacity,
float factor)
capacity - Initial capacityfactor - Load factor
protected abstract BaseCache<java.lang.Integer,java.lang.Object> createCache(int capacity,
float factor,
int level)
capacity - Initial capacityfactor - Load factorlevel - Concurrency level
public final void testGet()
Cache.get(Object).
public final void testRemove()
Cache.remove(Object).
public final void testPurge()
public final void testUnsupported()
BaseCache.
public final void testRemoveAndPut()
public final void testObjectMethods()
public final void testProfiler()
CacheProfiler.
protected final void forcePurge()
protected final void check(long[] a1,
long[] a2)
a1 - Left arraya2 - Right array
protected final void check(double[] a1,
double[] a2)
a1 - Left arraya2 - Right array
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||