Package com.ibm.di.queue
Class MemBufferQFactory
- java.lang.Object
-
- com.ibm.di.queue.MemBufferQFactory
-
public class MemBufferQFactory extends java.lang.ObjectThis class provides a global lookup table functionality. Every config instance has a hashtable associated with it where:
key : Thread.currentThread().getThreadGroup().getName()
object : hashtable of memory buffer pipes
Hash table of memory buffer pipes has :
key : any name specified by the user
object : MemBufferQ object.
This enables sharing of memory buffer pipes between two threads based on names giving it a named pipe like functionality.
-
-
Constructor Summary
Constructors Constructor Description MemBufferQFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddeleteQueue(java.lang.String pipeName)Deletes queue from memorystatic java.util.VectorgetActiveInstances()Gets all currently active instances.static MemBufferQFactorygetInstance()create a MemBufferQ factory for the current instance.static MemBufferQFactorygetInstance(java.lang.String inst)Get the MemBufferQ Factory for a particular instance.MemBufferQgetPipe(java.lang.String pipeName)Returns a reference to a memory buffer pipe.static java.util.VectorgetPipesForInstance(java.lang.String instName)Returns all active pipes for the specified instance.booleanisDoNotInitDB()MemBufferQnewPipe(java.lang.String pipeName, int watermark)Deprecated.MemBufferQnewPipe(java.lang.String pipeName, int watermark, int pagesize)Returns reference to a memory buffer pipe.booleanqueueExists(java.lang.String pipeName)Checks if queue exists in memory.voidsetDoNotInitDB(boolean doNotInitDB)static voidsetLog(Log l)
-
-
-
Method Detail
-
setLog
public static void setLog(Log l)
-
getInstance
public static MemBufferQFactory getInstance(java.lang.String inst)
Get the MemBufferQ Factory for a particular instance.- Parameters:
inst- The instance name- Returns:
- MemBufferQFactory object for that instance
-
getInstance
public static MemBufferQFactory getInstance()
create a MemBufferQ factory for the current instance.
-
getPipe
public MemBufferQ getPipe(java.lang.String pipeName) throws java.lang.Exception
Returns a reference to a memory buffer pipe.- Parameters:
pipeName- The name of memory buffer pipe of that instance- Returns:
- Returns a refernce to MemBufferQ object if one exists else null
- Throws:
java.lang.Exception- if either instName or pipeName is null
-
queueExists
public boolean queueExists(java.lang.String pipeName)
Checks if queue exists in memory.- Parameters:
pipeName- The name of the queue.- Returns:
- Returns true if the queue exists. Otherwise, false is returned.
-
newPipe
@Deprecated public MemBufferQ newPipe(java.lang.String pipeName, int watermark) throws java.lang.Exception
Deprecated.Returns reference to a memory buffer pipe.- Parameters:
pipeName- The name of memory buffer pipe of that instance if not found create a memory buffer pipe with that name with paging disabled, only watermark specified and return refernce to the newly created pipe.- Returns:
- A refernce to MemBufferQ object.
- Throws:
java.lang.Exception- if either instName or pipeName is null
-
newPipe
public MemBufferQ newPipe(java.lang.String pipeName, int watermark, int pagesize) throws java.lang.Exception
Returns reference to a memory buffer pipe.- Parameters:
pipeName- A name of memory buffer pipe of that instance if not found create a memory buffer pipe with that name with paging enabled and return refernce to the newly created pipe- Returns:
- A refernce to MemBufferQ object
- Throws:
java.lang.Exception- if either instName or pipeName is null.
-
getPipesForInstance
public static java.util.Vector getPipesForInstance(java.lang.String instName)
Returns all active pipes for the specified instance.- Parameters:
instName- An instance name.- Returns:
- All active pipes in the specified instance
-
getActiveInstances
public static java.util.Vector getActiveInstances()
Gets all currently active instances.- Returns:
- All active instances.
-
deleteQueue
public void deleteQueue(java.lang.String pipeName) throws java.lang.ExceptionDeletes queue from memory- Parameters:
pipeName-- Throws:
java.lang.Exception
-
isDoNotInitDB
public boolean isDoNotInitDB()
-
setDoNotInitDB
public void setDoNotInitDB(boolean doNotInitDB)
-
-