|
|||||||||||
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(String sDBName,
String jdbcLogin,
String jdbcPassword,
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()
|
Object |
peek()
Same as read but does not remove data from the memq |
void |
purgeQueue()
Purges the queue. |
Object |
read()
synchronized method: The first item inserted in the queue and not yet removed. |
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(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 Exception
Exception
public MemBufferQ(int nEntries, int pagesize, boolean doNotInitialiseDB) throws Exception
Exception
@Deprecated public MemBufferQ(int nEntries)
Method Detail |
---|
public void initDB(String sDBName, String jdbcLogin, String jdbcPassword, String sTblName) throws Exception
sDBName
- system store database namejdbcLogin
- username to connect to the dbjdbcPassword
- password to connect to the dbsTblName
- table name
Exception
- if system store is not initialized properlypublic boolean isEmpty()
public int size()
public Object read() throws Exception
Exception
public Object read(int timeout) throws Exception
Exception
public void acquireLock() throws InterruptedException
InterruptedException
public void releaseLock()
public void write(Object x) throws Exception
x
- object to be added
Exception
- if add failspublic 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 Exception
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 |