|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.xmlBlaster.test.classtest.queue.QueueThreadingTest
public class QueueThreadingTest
Test RamQueuePlugin.
The sorting order is priority,timestamp:
-> 5,100 - 5,98 - 5,50 - 9,3000 - 9,2500 ->
As 9 is highest priority it is the first to be taken out.
As we need to maintain the timely sequence and
id is a timestamp in (more or less) nano seconds elapsed since 1970)
the id 2500 (it is older) has precedence to the id 3000
Invoke: java -Djava.compiler= org.xmlBlaster.test.classtest.queue.QueueThreadingTest
Configuration example:
JdbcDriver.drivers=org.postgresql.Driver JdbcDriver.postgresql.mapping=string=text,longint=bigint,int=integer,boolean=boolean queue.callback.url=jdbc:postgresql://localhost/test queue.callback.user=postgres queue.callback.password=
Test database with PostgreSQL:
initdb /tmp/postgres cp /var/lib/pgsql/data/pg_hba.conf /tmp/postgres (edit host access) createdb test postmaster -i -D /tmp/postgres
MsgQueueEntry.compare(I_QueueEntry)
,
I_Queue
,
RamQueuePlugin
,
org.xmlBlaster.util.queue.jdbc.JdbcQueuePlugin
Field Summary | |
---|---|
int |
count
|
protected Global |
glob
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
private int |
numOfMsg
|
private int |
numOfQueues
|
static java.lang.String[] |
PLUGIN_TYPES
|
java.util.ArrayList |
queueList
|
private I_Queue[] |
queues
|
private int |
sizeOfMsg
|
private StopWatch |
stopWatch
|
Constructor Summary | |
---|---|
QueueThreadingTest(Global glob,
java.lang.String name,
int currImpl)
Constructor for junit public QueueThreadingTest(String name) { this(new Global(), name); } |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
java org.xmlBlaster.test.classtest.queue.QueueThreadingTest |
void |
performancePutMultiThread(int numOfQueues,
int numOfMsg,
int sizeOfMsg)
|
protected void |
setUp()
|
static junit.framework.Test |
suite()
Method is used by TestRunner to load these tests |
void |
tearDown()
|
void |
testPerfomancePutMultiThread()
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String ME
protected Global glob
private static java.util.logging.Logger log
private StopWatch stopWatch
private int numOfQueues
private int numOfMsg
private int sizeOfMsg
private I_Queue[] queues
public java.util.ArrayList queueList
public static java.lang.String[] PLUGIN_TYPES
public int count
Constructor Detail |
---|
public QueueThreadingTest(Global glob, java.lang.String name, int currImpl)
Method Detail |
---|
protected void setUp()
setUp
in class junit.framework.TestCase
public void tearDown()
tearDown
in class junit.framework.TestCase
public void testPerfomancePutMultiThread()
public void performancePutMultiThread(int numOfQueues, int numOfMsg, int sizeOfMsg) throws XmlBlasterException
XmlBlasterException
public static junit.framework.Test suite()
public static void main(java.lang.String[] args)
java org.xmlBlaster.test.classtest.queue.QueueThreadingTest
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |