ca.cbc.sportwire
Class JdbcBench

java.lang.Object
  |
  +--ca.cbc.sportwire.JdbcBench
All Implemented Interfaces:
java.lang.Runnable

public class JdbcBench
extends java.lang.Object
implements java.lang.Runnable

JdbcBench.java:

Created: Sat Feb 23 13:57:31 2002

 $Log$

 

Version:
$Id$
Author:
Gary Lawrence Murphy

Field Summary
private  int batch
           
(package private) static org.apache.log4j.Category cat
          Set up a reporting category in Log4J
private  int clients
           
private  org.apache.commons.collections.ExtendedProperties config
           
(package private) static java.lang.String FETCH
           
private  int loops
           
private  java.lang.String pid
           
private  java.lang.String sql
           
(package private) static java.lang.String UPDATE
           
 
Constructor Summary
JdbcBench(java.lang.String conf)
           
JdbcBench(java.lang.String conf, java.lang.String pid)
           
 
Method Summary
 int getBatch()
          Get the value of batch.
 int getClients()
          Get the value of clients.
 org.apache.commons.collections.ExtendedProperties getConfig()
          Get the value of config.
 int getLoops()
          Get the value of loops.
 java.lang.String getPid()
          Get the value of pid.
 java.lang.String getSql()
          Get the value of sql.
private  void loadProperties(java.lang.String conf)
           
static void main(java.lang.String[] args)
           
 void noBallot()
           
 void run()
           
 void runBallot()
           
 void setBatch(int v)
          Set the value of batch.
 void setClients(int v)
          Set the value of clients.
 void setConfig(org.apache.commons.collections.ExtendedProperties v)
          Set the value of config.
private static void setLogging(boolean debug)
          setLogging loads filters and appenders from the property file specified by wirefeeder.log4j.conf.
 void setLoops(int v)
          Set the value of loops.
 void setPid(java.lang.String v)
          Set the value of pid.
 void setSql(java.lang.String v)
          Set the value of sql.
 void test()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

cat

static org.apache.log4j.Category cat
Set up a reporting category in Log4J

FETCH

static final java.lang.String FETCH

UPDATE

static final java.lang.String UPDATE

config

private org.apache.commons.collections.ExtendedProperties config

batch

private int batch

loops

private int loops

clients

private int clients

sql

private java.lang.String sql

pid

private java.lang.String pid
Constructor Detail

JdbcBench

public JdbcBench(java.lang.String conf)
          throws java.io.IOException

JdbcBench

public JdbcBench(java.lang.String conf,
                 java.lang.String pid)
          throws java.io.IOException
Method Detail

getConfig

public org.apache.commons.collections.ExtendedProperties getConfig()
Get the value of config.
Returns:
ExtendedProperties value of config.

setConfig

public void setConfig(org.apache.commons.collections.ExtendedProperties v)
Set the value of config.
Parameters:
v - Value to assign to config.

loadProperties

private void loadProperties(java.lang.String conf)
                     throws java.io.IOException

getBatch

public int getBatch()
Get the value of batch.
Returns:
int value of batch.

setBatch

public void setBatch(int v)
Set the value of batch.
Parameters:
v - Value to assign to batch.

getLoops

public int getLoops()
Get the value of loops.
Returns:
int value of loops.

setLoops

public void setLoops(int v)
Set the value of loops.
Parameters:
v - Value to assign to loops.

getClients

public int getClients()
Get the value of clients.
Returns:
int value of clients.

setClients

public void setClients(int v)
Set the value of clients.
Parameters:
v - Value to assign to clients.

getSql

public java.lang.String getSql()
Get the value of sql.
Returns:
String value of sql.

setSql

public void setSql(java.lang.String v)
Set the value of sql.
Parameters:
v - Value to assign to sql.

test

public void test()
          throws java.io.IOException

run

public void run()
Specified by:
run in interface java.lang.Runnable

getPid

public java.lang.String getPid()
Get the value of pid.
Returns:
String value of pid.

setPid

public void setPid(java.lang.String v)
Set the value of pid.
Parameters:
v - Value to assign to pid.

runBallot

public void runBallot()

noBallot

public void noBallot()

setLogging

private static void setLogging(boolean debug)
setLogging loads filters and appenders from the property file specified by wirefeeder.log4j.conf. If debug is false, messages below WARN priority will be suppressed. This can be undone in a production releasey through the log4j.disableOverride property.

main

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