com.xenonsoft.bridgetown.test
Class TestContextCache.AttackerThread

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.xenonsoft.bridgetown.test.TestContextCache.AttackerThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
TestContextCache

protected class TestContextCache.AttackerThread
extends java.lang.Thread

Specialist attacker thread designed to assault the context cache implementation. This thread accepts a list collection of indices (keys) that associate with java.lang.Integer value, The core of the thread iterates through each index and increments the value.

The attacker thread synchronises itself with the context cache object in order to avoid race conditions and ensure atomicity for the increment.

Version:
$Id: TestContextCache.java,v 1.2 2004/10/27 02:24:53 peter_pilgrim Exp $
Author:
peterp, 04-Oct-2004

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TestContextCache.AttackerThread()
          Default constructor to get around JUnit test case error
TestContextCache.AttackerThread(java.util.List indexList, int iterations)
          Standard constructor
 
Method Summary
 void run()
          Execute method
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, 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
 

Constructor Detail

TestContextCache.AttackerThread

public TestContextCache.AttackerThread()
Default constructor to get around JUnit test case error


TestContextCache.AttackerThread

public TestContextCache.AttackerThread(java.util.List indexList,
                                       int iterations)
Standard constructor

Method Detail

run

public void run()
Execute method



Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.