Package com.wombat.mama
Class MamaQueue
- java.lang.Object
-
- com.wombat.mama.MamaQueue
-
public class MamaQueue extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description MamaMsgreuseableMsg
-
Constructor Summary
Constructors Constructor Description MamaQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(MamaBridge bridge)voidcreateUsingNative(MamaBridge bridge, java.lang.Object nativeQueue)voiddestroy()Destroy the queue, this function should only be called if there are no open objects against the queue.voiddestroyTimedWait(long timeout)Destroy a queue.voiddestroyWait()Destroy a queue.voiddispatch()voidenqueueEvent(MamaQueueEventCallback callback, java.lang.Object closure)longgetEventCount()longgetHighwatermark()longgetLowWatermark()longgetPointerVal()java.lang.StringgetQueueBridgeName()java.lang.StringgetQueueName()voidsetHighWatermark(long highWatermark)voidsetLowWatermark(long lowWatermark)voidsetQueueMonitorCallback(MamaQueueMonitorCallback callback)voidsetQueueName(java.lang.String queueName)voidstopDispatch()
-
-
-
Field Detail
-
reuseableMsg
public MamaMsg reuseableMsg
-
-
Method Detail
-
getPointerVal
public long getPointerVal()
-
create
public void create(MamaBridge bridge)
-
createUsingNative
public void createUsingNative(MamaBridge bridge, java.lang.Object nativeQueue)
-
destroy
public void destroy()
Destroy the queue, this function should only be called if there are no open objects against the queue. Use one of the other destroy functions to block until all objects have been cleaned up.- Throws:
MamaException- will be thrown if there are open objects.
-
destroyWait
public void destroyWait()
Destroy a queue. Note that the queue can only be destroyed if all of the objects created on it, (timers, subscriptions etc), have been destroyed. This function will block until all of the objects have been destroyed and will then destroy the queue.
-
destroyTimedWait
public void destroyTimedWait(long timeout)
Destroy a queue. Note that the queue can only be destroyed if all of the objects created on it, (timers, subscriptions etc), have been destroyed. This function will block until all of the objects have been destroyed and will then destroy the queue.- Parameters:
timeout- The time to block for in milliseconds.- Throws:
MamaException- will be thrown if the timeout elapses.
-
dispatch
public void dispatch()
-
stopDispatch
public void stopDispatch()
-
enqueueEvent
public void enqueueEvent(MamaQueueEventCallback callback, java.lang.Object closure)
-
setQueueMonitorCallback
public void setQueueMonitorCallback(MamaQueueMonitorCallback callback)
-
setHighWatermark
public void setHighWatermark(long highWatermark)
-
getHighwatermark
public long getHighwatermark()
-
setLowWatermark
public void setLowWatermark(long lowWatermark)
-
getLowWatermark
public long getLowWatermark()
-
setQueueName
public void setQueueName(java.lang.String queueName)
-
getQueueName
public java.lang.String getQueueName()
-
getQueueBridgeName
public java.lang.String getQueueBridgeName()
-
getEventCount
public long getEventCount()
-
-