Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::jlog::test::TestEngineCacheEntriesQueue Class Reference

List of all members.

Public Member Functions

 TestEngineCacheEntriesQueue ()
void testPushPopQueue () throws Exception
void testPushPopQueueVector () throws Exception
void testPushPopQueueVectorFile () throws Exception
void testClear () throws Exception
void testRandomOrder () throws Exception

Protected Member Functions

Override void setUp () throws Exception
Override void tearDown () throws Exception

Private Member Functions

void populateEntries () throws Exception

Private Attributes

Vector< CacheEntryentries = new Vector<CacheEntry>()
CacheEntriesQueue queue

Static Private Attributes

final int TEST_ENTRIES = 100000

Detailed Description

Test the CacheEntriesQueue

Author:
acaproni


Constructor & Destructor Documentation

alma::acs::jlog::test::TestEngineCacheEntriesQueue::TestEngineCacheEntriesQueue  )  [inline]
 

Constructor


Member Function Documentation

void alma::acs::jlog::test::TestEngineCacheEntriesQueue::populateEntries  )  throws Exception [inline, private]
 

Generate a set of TEST_ENTRIES entries in the entries vector.

Override void alma::acs::jlog::test::TestEngineCacheEntriesQueue::setUp  )  throws Exception [inline, protected]
 

Override void alma::acs::jlog::test::TestEngineCacheEntriesQueue::tearDown  )  throws Exception [inline, protected]
 

void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testClear  )  throws Exception [inline]
 

Test the clearing of the queue

void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testPushPopQueue  )  throws Exception [inline]
 

Push and pop entries involving only the LinkedBlockingQueue (i.e non entries go in the vector, nor in the file)

Implementation note:

  1. add the entries in the cache
  2. check the number of entries in the queue
  3. get all the entries from the queue checking if they are the same of the pushed ones

void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testPushPopQueueVector  )  throws Exception [inline]
 

Push and pop entries involving the LinkedBlockingQueue and the vector but not the file

Implementation note:

  1. add the entries in the cache
  2. check the number of entries in the queue
  3. get all the entries from the queue checking if they are the same of the pushed ones

void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testPushPopQueueVectorFile  )  throws Exception [inline]
 

Push and pop entries involving the LinkedBlockingQueue, the vector and the file.

Implementation note:

  1. add the entries in the cache
  2. check the number of entries in the queue
  3. get all the entries from the queue checking if they are the same of the pushed ones

The limit of this test is that entries have been sent in the queue before reading.

void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testRandomOrder  )  throws Exception [inline]
 

This test completes what is done by testPushPopQueueVectorFile but now the sequence of reading and writing operations happens randomly

Exceptions:
Exception 


Member Data Documentation

Vector<CacheEntry> alma::acs::jlog::test::TestEngineCacheEntriesQueue::entries = new Vector<CacheEntry>() [private]
 

The vector of CacheEntry sent and read from the queue

CacheEntriesQueue alma::acs::jlog::test::TestEngineCacheEntriesQueue::queue [private]
 

The queue to test

final int alma::acs::jlog::test::TestEngineCacheEntriesQueue::TEST_ENTRIES = 100000 [static, private]
 

The number of CacheEntry for testing


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:36 2009 for ACS Java API by doxygen 1.3.8