public class SingleRecordUpdateClient extends java.lang.Object implements Client
SingleRecordFiller. Each time the client's doWork() method
is called, it will pick one of the tables randomly, and update the text
column of one random record in that table.| Modifier and Type | Field and Description |
|---|---|
private java.sql.Connection |
conn |
private int |
dataType |
private boolean |
noIndex |
private java.sql.PreparedStatement[] |
pss |
private java.util.Random |
r |
private boolean |
secondaryIndex |
private int |
tableSize |
| Constructor and Description |
|---|
SingleRecordUpdateClient(int records,
int tables)
Construct a new single-record update client.
|
SingleRecordUpdateClient(int records,
int tables,
int type,
boolean secIndex,
boolean nonIndexed)
Construct a new single-record update client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doWork()
Perform the work for a single iteration of the test (typically a single
transaction).
|
void |
init(java.sql.Connection c)
Initialize this client (typically prepare the statements needed in the
doWork() method). |
void |
printReport(java.io.PrintStream out)
Print a report from the test run.
|
private java.sql.Connection conn
private final java.sql.PreparedStatement[] pss
private final java.util.Random r
private final int tableSize
private final int dataType
private final boolean secondaryIndex
private final boolean noIndex
public SingleRecordUpdateClient(int records,
int tables)
records - the number of records in each table in the testtables - the number of tables in the testpublic SingleRecordUpdateClient(int records,
int tables,
int type,
boolean secIndex,
boolean nonIndexed)
records - the number of records in each table in the testtables - the number of tables in the testpublic void init(java.sql.Connection c)
throws java.sql.SQLException
ClientdoWork() method).public void doWork()
throws java.sql.SQLException
Clientpublic void printReport(java.io.PrintStream out)
ClientprintReport in interface Clientout - stream to print the report toApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.