Package com.ibm.di.queue
Class DBHandler
- java.lang.Object
-
- com.ibm.di.queue.DBHandler
-
public class DBHandler extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
bDirty
protected PESConnector
connect
protected int
pageSize
protected int
size
-
Constructor Summary
Constructors Constructor Description DBHandler(int size, IDGenerator gen)
constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToDB(MemQ chunk)
thread run method stores pages from chunk to the system storevoid
emptySystemStore()
Deletes contents of table associated with queuePESConnector
getConnect()
void
initialize(java.lang.String sDBName, java.lang.String jdbcLogin, java.lang.String jdbcPassword, java.lang.String sTblName)
Initializes the system store parametersboolean
isStoreEmpty()
void
terminate()
terminates the system store operation
-
-
-
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 storinggen
-- 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 namejdbcLogin
- username to connect to the dbjdbcPassword
- password to connect to the dbsTblName
- 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()
-
-