|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.queue.MemBufferQ
public class MemBufferQ
A FIFO queue
Constructor Summary | |
---|---|
MemBufferQ(int nEntries)
Deprecated. |
|
MemBufferQ(int nEntries,
int pagesize)
Constructor Initializes the memory buffer pipe when paging is enabled. |
|
MemBufferQ(int nEntries,
int pagesize,
boolean doNotInitialiseDB)
Constructor Initializes the memory buffer pipe when paging is enabled.Initialization of the DB properties is done only when the queue is being created from the UserFunctions. |
Method Summary | |
---|---|
void |
acquireLock()
|
void |
blockAdd(boolean enable)
Enable disable blocking add this is used only when paging support is disabled. |
void |
enablePersistence(boolean enable)
enablePersistence : enable/disable paging support using system store |
DBHandler |
getDbHandler()
|
int |
getPercentMemoryUse()
|
void |
initDB(java.lang.String sDBName,
java.lang.String jdbcLogin,
java.lang.String jdbcPassword,
java.lang.String sTblName)
Initializes the system store paramemters. |
boolean |
isEmpty()
|
boolean |
isMemoryAvailable()
Checks if there is enough memory available as specified by the user |
boolean |
isPurging()
|
java.lang.Object |
peek()
Same as read but does not remove data from the memq |
void |
purgeQueue()
Purges the queue. |
java.lang.Object |
read()
synchronized method: The first item inserted in the queue and not yet removed. |
java.lang.Object |
read(int timeout)
synchronized method: The first item inserted in the queue and not yet removed. |
void |
releaseLock()
|
void |
setDbHandler(DBHandler dbHandler)
|
void |
setPercentMemoryUse(int percentMemoryUse)
|
int |
size()
|
void |
terminate(boolean dropSystemStore)
terminates the system store threads and drops table if dropSystemStore set to true |
void |
write(java.lang.Object x)
write : add an object to the end of memq |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemBufferQ(int nEntries, int pagesize) throws java.lang.Exception
java.lang.Exception
public MemBufferQ(int nEntries, int pagesize, boolean doNotInitialiseDB) throws java.lang.Exception
java.lang.Exception
@Deprecated public MemBufferQ(int nEntries)
Method Detail |
---|
public void initDB(java.lang.String sDBName, java.lang.String jdbcLogin, java.lang.String jdbcPassword, java.lang.String sTblName) throws java.lang.Exception
sDBName
- system store database namejdbcLogin
- username to connect to the dbjdbcPassword
- password to connect to the dbsTblName
- table name
java.lang.Exception
- if system store is not initialized properlypublic boolean isEmpty()
public int size()
public java.lang.Object read() throws java.lang.Exception
java.lang.Exception
public java.lang.Object read(int timeout) throws java.lang.Exception
java.lang.Exception
public void acquireLock() throws java.lang.InterruptedException
java.lang.InterruptedException
public void releaseLock()
public void write(java.lang.Object x) throws java.lang.Exception
x
- object to be added
java.lang.Exception
- if add failspublic java.lang.Object peek()
public void enablePersistence(boolean enable)
enable
- paging support enabled if true and disabled if falsepublic boolean isPurging()
public void blockAdd(boolean enable)
enable
- if true, add to memq blocks infinitely until there is space
for an object to be added to memq if false, add throws an
exception if memq is fullpublic void terminate(boolean dropSystemStore)
dropSystemStore
- public void purgeQueue() throws java.lang.Exception
java.lang.Exception
public int getPercentMemoryUse()
public void setPercentMemoryUse(int percentMemoryUse)
public boolean isMemoryAvailable()
public DBHandler getDbHandler()
public void setDbHandler(DBHandler dbHandler)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |