|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.cjdbc.scenario.tools.util.RequestSender
This class defines a RequestSender. This will send request in the background.
Field Summary | |
(package private) long |
average
|
(package private) int |
commitIntervalMax
|
(package private) java.sql.Connection |
con
|
(package private) static int |
DO_COMMIT_RAND_NUMBER
|
(package private) static int |
DO_WRITE_EVERY
|
(package private) int |
doWriteEvery
|
(package private) java.util.ArrayList |
exceptions
|
(package private) static int |
LOOP_IN_THREAD
|
(package private) int |
loopInThread
|
(package private) static int |
MAIN_THREAD_QUERY_LOOP
|
(package private) static int |
MAX_ID_VALUE
|
(package private) static int |
MAX_RESPONSE_TIME
|
(package private) int |
maxIdValue
|
(package private) int |
maxResponseTime
|
(package private) static boolean |
MONITOR_SPEED
|
(package private) boolean |
monitorSpeed
|
(package private) QueryGenerator |
queryGenerator
|
(package private) int |
queryLoop
|
(package private) boolean |
quit
|
(package private) java.util.Random |
rand
|
(package private) int |
requestCount
|
(package private) int |
requestInterval
|
(package private) long |
runtime
|
(package private) static int |
TIME_BETWEEN_REQUEST
|
(package private) static boolean |
USE_PREPARED_STATEMENT
|
(package private) static boolean |
USE_QUERY_GENERATOR
|
(package private) static boolean |
USE_TRANSACTION
|
(package private) boolean |
usePreparedStatement
|
(package private) boolean |
useQueryGenerator
|
(package private) boolean |
useTransactions
|
Constructor Summary | |
RequestSender(java.sql.Connection con)
Creates a new RequestSender object with standard settings |
Method Summary | |
long |
getAverage()
Returns the average value. |
java.util.ArrayList |
getExceptions()
Returns the exceptions value. |
QueryGenerator |
getQueryGenerator()
|
int |
getRequestCount()
Returns the requestCount value. |
long |
getRuntime()
Returns the runtime value. |
private java.lang.String |
getSelectStatement(boolean preparedStatement,
int id)
|
private java.lang.String |
getUpdateStatement(boolean preparedStatement,
int addressid,
int id)
|
boolean |
isQuit()
Returns the quit value. |
void |
run()
|
void |
setCommitIntervalMax(int commitIntervalMax)
Sets the commitIntervalMax value. |
void |
setDoWriteEvery(int doWriteEvery)
Sets the doWriteEvery value. |
void |
setLoopInThread(int loopInThread)
Sets the loopInThread value. |
void |
setMaxIdValue(int maxIdValue)
Sets the maxIdValue value. |
void |
setMaxResponseTime(int maxResponseTime)
Sets the maxResponseTime value. |
void |
setMonitorSpeed(boolean monitorSpeed)
|
void |
setQueryGenerator(QueryGenerator queryGenerator)
Sets the queryGenerator value. |
void |
setQueryLoop(int queryLoop)
Sets the queryLoop value. |
void |
setQuit(boolean quit)
Sets the quit value. |
void |
setRand(java.util.Random rand)
Sets the rand value. |
void |
setRequestInterval(int requestInterval)
Sets the requestInterval value. |
void |
setUsePreparedStatement(boolean usePreparedStatement)
Sets the usePreparedStatement value. |
void |
setUseQueryGenerator(boolean useQueryGenerator)
Sets the useQueryGenerator value. |
void |
setUseTransactions(boolean useTransactions)
Sets the useTransactions value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
boolean quit
java.util.Random rand
java.util.ArrayList exceptions
java.sql.Connection con
long runtime
QueryGenerator queryGenerator
int loopInThread
int doWriteEvery
int queryLoop
int maxIdValue
int maxResponseTime
int requestInterval
boolean useTransactions
int commitIntervalMax
boolean usePreparedStatement
boolean monitorSpeed
int requestCount
long average
boolean useQueryGenerator
static final int LOOP_IN_THREAD
static final int DO_WRITE_EVERY
static final int MAIN_THREAD_QUERY_LOOP
static final int MAX_ID_VALUE
static final int MAX_RESPONSE_TIME
static final int TIME_BETWEEN_REQUEST
static final boolean USE_TRANSACTION
static final int DO_COMMIT_RAND_NUMBER
static final boolean USE_PREPARED_STATEMENT
static final boolean MONITOR_SPEED
static final boolean USE_QUERY_GENERATOR
Constructor Detail |
public RequestSender(java.sql.Connection con)
RequestSender
object with standard settings
con
- the connection to the databaseMethod Detail |
public void setMonitorSpeed(boolean monitorSpeed)
monitorSpeed
- The monitorSpeed to set.private java.lang.String getSelectStatement(boolean preparedStatement, int id)
private java.lang.String getUpdateStatement(boolean preparedStatement, int addressid, int id)
public QueryGenerator getQueryGenerator() throws java.sql.SQLException
java.sql.SQLException
public void run()
run
in interface java.lang.Runnable
Runnable.run()
public boolean isQuit()
public void setQuit(boolean quit)
quit
- The quit to set.public java.util.ArrayList getExceptions()
public void setCommitIntervalMax(int commitIntervalMax)
commitIntervalMax
- The commitIntervalMax to set.public void setDoWriteEvery(int doWriteEvery)
doWriteEvery
- The doWriteEvery to set.public void setLoopInThread(int loopInThread)
loopInThread
- The loopInThread to set.public void setMaxIdValue(int maxIdValue)
maxIdValue
- The maxIdValue to set.public void setMaxResponseTime(int maxResponseTime)
maxResponseTime
- The maxResponseTime to set.public void setQueryLoop(int queryLoop)
queryLoop
- The queryLoop to set.public void setRand(java.util.Random rand)
rand
- The rand to set.public void setRequestInterval(int requestInterval)
requestInterval
- The requestInterval to set.public void setUseTransactions(boolean useTransactions)
useTransactions
- The useTransactions to set.public long getRuntime()
public void setUsePreparedStatement(boolean usePreparedStatement)
usePreparedStatement
- The usePreparedStatement to set.public long getAverage()
public int getRequestCount()
public void setUseQueryGenerator(boolean useQueryGenerator)
useQueryGenerator
- The useQueryGenerator to set.public void setQueryGenerator(QueryGenerator queryGenerator)
queryGenerator
- The queryGenerator to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |