|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.performance.PerfTest
Derivate this class to implement a test client for the performance test.
Constructor Summary | |
PerfTest()
|
Method Summary | |
abstract int |
articleCount()
Returns the count of all found PerfArticle
in database. |
abstract void |
deleteArticles(PerfArticle[] arr)
Delete all given article from the database. |
abstract void |
deleteArticlesStress(PerfArticle[] arr)
Delete all given article from the database in a really resource sressing way. |
abstract PerfArticle |
getArticleByIdentity(java.lang.Long articleId)
Read all stored articles from the database and return the result as collection of PerfArticles . |
PerfArticle |
getPreparedPerfArticle(java.lang.String articleName)
Factory method that creates an PerfArticle
using the PerfArticleImpl class,
override this method if you need your own implementation
of the PerfArticle-Interface. |
java.lang.String |
getTestObjectName()
The returned name was used as 'articleName' for all created PerfArticles for this thread. |
abstract void |
init()
Init the test. |
abstract void |
insertNewArticles(PerfArticle[] arr)
Store the given articles to database. |
abstract void |
insertNewArticlesStress(PerfArticle[] arr)
Store the given articles to database. |
PerfArticle |
newPerfArticle()
Called to get a new instance class of the PerfArticle
interface, override this method if you need your own implementation
(with default constructor) of the PerfArticle-Interface. |
abstract java.util.Collection |
readArticlesByCursor(java.lang.String articleName)
Read all stored articles from the database and return the result as collection of PerfArticles . |
void |
run()
Runnable implementation method. |
abstract void |
tearDown()
Do clean up. |
abstract java.lang.String |
testName()
Returns the name of the test |
abstract void |
updateArticles(PerfArticle[] arr)
Update the given articles. |
abstract void |
updateArticlesStress(PerfArticle[] arr)
Update the given articles. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PerfTest()
Method Detail |
public abstract java.lang.String testName()
public abstract int articleCount()
PerfArticle
in database.
This method is not involved in the performance test
methods, thus it's not mandatory to use the api-methods
for implementation.
public abstract void init() throws java.lang.Exception
java.lang.Exception
public abstract void tearDown() throws java.lang.Exception
java.lang.Exception
public abstract void insertNewArticles(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract void insertNewArticlesStress(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract java.util.Collection readArticlesByCursor(java.lang.String articleName) throws java.lang.Exception
PerfArticles
.
Do optimize performance.
articleName
- article name used for all PerfArticle
created
by this instance/thread. Use this name in your query to match all belonging articles
java.lang.Exception
public abstract PerfArticle getArticleByIdentity(java.lang.Long articleId) throws java.lang.Exception
PerfArticles
.
Do optimize performance.
articleId
- the primary key of a PerfArticle
instance
PerfArticle
instance or null if not found.
java.lang.Exception
public abstract void deleteArticles(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract void deleteArticlesStress(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract void updateArticles(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract void updateArticlesStress(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public PerfArticle newPerfArticle()
PerfArticle
interface, override this method if you need your own implementation
(with default constructor) of the PerfArticle-Interface.
PerfArticleImpl
class.
public java.lang.String getTestObjectName()
PerfArticles
for this thread.
This allows an easy build of the query statement
to match the created PerfArticle
for this
instance/thread.
public PerfArticle getPreparedPerfArticle(java.lang.String articleName)
PerfArticle
using the PerfArticleImpl
class,
override this method if you need your own implementation
of the PerfArticle-Interface.
articleName
- set the 'articleName'
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |