org.apache.derbyTesting.functionTests.tests.store
Class OnlineBackupTest1.DatabaseActions

java.lang.Object
  extended by org.apache.derbyTesting.functionTests.tests.store.OnlineBackupTest1.DatabaseActions
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
OnlineBackupTest1

 class OnlineBackupTest1.DatabaseActions
extends java.lang.Object
implements java.lang.Runnable


Field Summary
private  int action
           
private static int COMMIT
           
private  java.sql.Connection conn
           
static int CREATEDROPS
           
static int DMLACTIONS
           
private static int OPENTX
           
private static int ROLLBACK
           
private  boolean stopActivity
           
 
Constructor Summary
OnlineBackupTest1.DatabaseActions(java.sql.Connection conn)
           
OnlineBackupTest1.DatabaseActions(int action, java.sql.Connection conn)
           
 
Method Summary
(package private)  void createTable(java.lang.String tableName)
           
(package private)  void endTransaction(int txStatus)
          commit/rollback the transaction.
(package private)  void endUnloggedAction(java.lang.String tableName)
          end an Unlogged operation, commit the transaction.
(package private)  void insert(java.lang.String tableName, int rowCount, int txStatus, int commitCount)
          Insert some rows into the specified table.
(package private)  void performCreateDropTables()
          Create and Drop some tables.
(package private)  void performDmlActions()
           
 void run()
          implementation of run() method in the Runnable interface, which is invoked when a thread is started using this class object.
(package private)  void select(java.lang.String tableName)
           
(package private)  void startUnloggedAction(java.lang.String tableName)
          start an Unlogged operation, but don't commit the transaction.
 void stopActivity()
          stops any actions that are looping on a differt threads.
(package private)  void update(java.lang.String tableName, int rowCount, int txStatus, int commitCount)
          update some rows in the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DMLACTIONS

public static final int DMLACTIONS
See Also:
Constant Field Values

CREATEDROPS

public static final int CREATEDROPS
See Also:
Constant Field Values

COMMIT

private static final int COMMIT
See Also:
Constant Field Values

ROLLBACK

private static final int ROLLBACK
See Also:
Constant Field Values

OPENTX

private static final int OPENTX
See Also:
Constant Field Values

action

private int action

stopActivity

private volatile boolean stopActivity

conn

private java.sql.Connection conn
Constructor Detail

OnlineBackupTest1.DatabaseActions

OnlineBackupTest1.DatabaseActions(java.sql.Connection conn)

OnlineBackupTest1.DatabaseActions

OnlineBackupTest1.DatabaseActions(int action,
                                  java.sql.Connection conn)
Method Detail

stopActivity

public void stopActivity()
stops any actions that are looping on a differt threads.


run

public void run()
implementation of run() method in the Runnable interface, which is invoked when a thread is started using this class object.

Performs DML ot DDL actions.

Specified by:
run in interface java.lang.Runnable

performDmlActions

void performDmlActions()
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

startUnloggedAction

void startUnloggedAction(java.lang.String tableName)
                   throws java.sql.SQLException
start an Unlogged operation, but don't commit the transaction.

Parameters:
tableName - name of the table to start the unlogged operation.
Throws:
java.sql.SQLException - if any database exception occurs.

endUnloggedAction

void endUnloggedAction(java.lang.String tableName)
                 throws java.sql.SQLException
end an Unlogged operation, commit the transaction.

Parameters:
tableName - name of the table to end unlogged operation.
Throws:
java.sql.SQLException - if any database exception occurs.

performCreateDropTables

void performCreateDropTables()
                       throws java.sql.SQLException
Create and Drop some tables.

Throws:
java.sql.SQLException - if any database exception occurs.

insert

void insert(java.lang.String tableName,
            int rowCount,
            int txStatus,
            int commitCount)
      throws java.sql.SQLException
Insert some rows into the specified table.

Parameters:
tableName - name of the table that rows are inserted.
rowCount - Number of rows to Insert.
txStatus - Transacton status commit/rollback/open.
commitCount - After how many inserts commit/rollbacku should happen.
Throws:
java.sql.SQLException - if any database exception occurs.

endTransaction

void endTransaction(int txStatus)
              throws java.sql.SQLException
commit/rollback the transaction.

Parameters:
txStatus - Transacton status commit/rollback/open.
Throws:
java.sql.SQLException - if any database exception occurs.

update

void update(java.lang.String tableName,
            int rowCount,
            int txStatus,
            int commitCount)
      throws java.sql.SQLException
update some rows in the table.

Parameters:
tableName - name of the table that rows are updates.
rowCount - Number of rows to update.
txStatus - Transacton status commit/rollback/open.
commitCount - After how many updates commit/rollback should happen.
Throws:
java.sql.SQLException - if any database exception occurs.

select

void select(java.lang.String tableName)
      throws java.sql.SQLException
Throws:
java.sql.SQLException

createTable

void createTable(java.lang.String tableName)
           throws java.sql.SQLException
Throws:
java.sql.SQLException

Built on Sat 2009-11-28 18:44:18-0800, from revision 885187

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.