org.jwarp.service.cache.test
Class CacheTest.AccessThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.jwarp.service.cache.test.CacheTest.AccessThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
CacheTest

class CacheTest.AccessThread
extends java.lang.Thread

Thread simulating the access to a cache.


Field Summary
(package private)  Cache cache
          The cache to be accessed
(package private)  int filledItems
          The total number of items refilled to the cache.
(package private)  int itemCount
          The item count
(package private)  java.util.Hashtable items
          The items to be accessed.
(package private)  int queriedItems
          The total number of item queried.
(package private)  long timeLimit
          The time limit of the accesses.
 
Fields inherited from class java.lang.Thread
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals
 
Constructor Summary
(package private) CacheTest.AccessThread(Cache cache, java.util.Hashtable items, long timeLimit)
          Constructs a new access thread.
 
Method Summary
 void printStats(java.io.PrintStream pw)
          Prints out the access statistics to the printwriter object pased.
 void run()
          Run the test.
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

items

java.util.Hashtable items
The items to be accessed.

cache

Cache cache
The cache to be accessed

itemCount

int itemCount
The item count

timeLimit

long timeLimit
The time limit of the accesses.

queriedItems

int queriedItems
The total number of item queried.

filledItems

int filledItems
The total number of items refilled to the cache.
Constructor Detail

CacheTest.AccessThread

CacheTest.AccessThread(Cache cache,
                       java.util.Hashtable items,
                       long timeLimit)
Constructs a new access thread.
Parameters:
cache - The cache to be accessed.
items - The items to be accessed.
timeLimit - How long the cache should be accessed.
Method Detail

run

public void run()
Run the test.
Overrides:
run in class java.lang.Thread

printStats

public void printStats(java.io.PrintStream pw)
Prints out the access statistics to the printwriter object pased.
Parameters:
pw - The target print writer

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