com.ibm.di.queue
Class DBHandler

java.lang.Object
  extended by com.ibm.di.queue.DBHandler

public class DBHandler
extends java.lang.Object


Field Summary
protected static boolean bDirty
           
protected  PESConnector connect
           
protected  int pageSize
           
protected  int size
           
 
Constructor Summary
DBHandler(int size, IDGenerator gen)
          constructor
 
Method Summary
 void addToDB(MemQ chunk)
          thread run method stores pages from chunk to the system store
 void emptySystemStore()
          Deletes contents of table associated with queue
 PESConnector getConnect()
           
 void initialize(java.lang.String sDBName, java.lang.String jdbcLogin, java.lang.String jdbcPassword, java.lang.String sTblName)
          Initializes the system store parameters
 boolean isStoreEmpty()
           
 void terminate()
          terminates the system store operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

protected int size

connect

protected PESConnector connect

bDirty

protected static boolean bDirty

pageSize

protected int pageSize
Constructor Detail

DBHandler

public DBHandler(int size,
                 IDGenerator gen)
          throws java.lang.Exception
constructor

Parameters:
size - threshold if loading pagesize if storing
gen -
Throws:
java.lang.Exception
Method Detail

initialize

public void initialize(java.lang.String sDBName,
                       java.lang.String jdbcLogin,
                       java.lang.String jdbcPassword,
                       java.lang.String sTblName)
                throws java.lang.Exception
Initializes the system store parameters

Parameters:
sDBName - system store database name
jdbcLogin - username to connect to the db
jdbcPassword - password to connect to the db
sTblName - table name
Throws:
java.lang.Exception - if system store is not initialized properly

terminate

public void terminate()
terminates the system store operation


isStoreEmpty

public boolean isStoreEmpty()

emptySystemStore

public void emptySystemStore()
                      throws java.lang.Exception
Deletes contents of table associated with queue

Throws:
java.lang.Exception

addToDB

public void addToDB(MemQ chunk)
             throws java.lang.Exception
thread run method stores pages from chunk to the system store

Throws:
java.lang.Exception

getConnect

public PESConnector getConnect()