org.jboss.cache.tests
Class ReentrantWriterPreferenceReadWriteLockTest

java.lang.Object
  extended byTestCase
      extended byorg.jboss.cache.tests.ReentrantWriterPreferenceReadWriteLockTest

public class ReentrantWriterPreferenceReadWriteLockTest
extends TestCase

Tests ReentrantWriterPreferenceReadWriteLock

See Also:
Serialized Form

Constructor Summary
ReentrantWriterPreferenceReadWriteLockTest()
           
 
Method Summary
 void acquireReadAndWriteLocks()
           
 void acquireWriteThenReadLock()
           
static void main(java.lang.String[] args)
           
protected  void setUp()
           
static Test suite()
           
protected  void tearDown()
           
 void test2ReadersAnd1Writer()
           
 void testAcquireWriteLockAfterReadLock()
           
 void testAcquiringReadLockedLock()
           
 void testAcquiringReadLockedLockWithRead()
           
 void testMultipleReadLockAcquisitions()
           
 void testMultipleReadLockReleases()
           
 void testMultipleWriteLockAcquisitions()
           
 void testMultipleWriteLockReleases()
           
 void testReadThenWriteByDifferentTx()
           
 void testWriteThenReadByDifferentTx()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReentrantWriterPreferenceReadWriteLockTest

public ReentrantWriterPreferenceReadWriteLockTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testMultipleReadLockAcquisitions

public void testMultipleReadLockAcquisitions()
                                      throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testMultipleWriteLockAcquisitions

public void testMultipleWriteLockAcquisitions()
                                       throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testMultipleReadLockReleases

public void testMultipleReadLockReleases()
                                  throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

acquireReadAndWriteLocks

public void acquireReadAndWriteLocks()
                              throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

acquireWriteThenReadLock

public void acquireWriteThenReadLock()
                              throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testMultipleWriteLockReleases

public void testMultipleWriteLockReleases()
                                   throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testAcquireWriteLockAfterReadLock

public void testAcquireWriteLockAfterReadLock()
                                       throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testAcquiringReadLockedLockWithRead

public void testAcquiringReadLockedLockWithRead()
                                         throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testAcquiringReadLockedLock

public void testAcquiringReadLockedLock()
                                 throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

test2ReadersAnd1Writer

public void test2ReadersAnd1Writer()
                            throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testWriteThenReadByDifferentTx

public void testWriteThenReadByDifferentTx()
                                    throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testReadThenWriteByDifferentTx

public void testReadThenWriteByDifferentTx()
                                    throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

suite

public static Test suite()

main

public static void main(java.lang.String[] args)