Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / %SYSTEM.IPQSet
Private  Storage   


InterProcessQueues are for first in first out message transport.
This Extends the %SYSTEM.IPQ class. It provides a way to manage a set of Queues that it can receive messages from.
This class or the IPQ class can be used for receiving Queued messages, but not both at the same time.
When a get is called it will return the next msg in a round robin order from any of the attached queues to this set.
The destructor of this class or the Delete method will delete all attached Queues, and a message Put attempt to any deleted queue will fail.
The Add method adds/creates the specified Queue for Gets.


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 4 11



Add DeleteAll Get NextValueGet
NextValueTimeoutGet NextValueTimeoutSet SessionNumGet SessionNumSet



• parameter %MODULENAME = 5;


• property NextValue as %Integer [ Private,Calculated ];
Returns the next value similar to Get() method
• property NextValueTimeout as %Integer [ Private,Calculated ];
Returns the next value similar to Get() method
• property SessionNum as %Integer [ Calculated ];
The session ID associated with the received message, zero if times out, or -1 if there is no active session
• property SetIdx as %Integer [ Private ];
Round robin index


• private method %OnClose() as %Status
• private method %OnNew() as %Status
• method Add(name As %Binary, InitialSize As %Integer) as %Integer [ Language = cpp ]
Add will Create or Attach an existing InterProcessQueue (IPQ) for Gets to this IPQ set.
Note: The Queue could be pre-created for Put but not for Get from some other object.
Create will try to pre allocate the specified number of 32K chunks for the message queue
Create will fail if another queue with the same name already exists.
Returns zero on failure else returns the Q id
When added to this set, the next call to Get will consider returning messages from the queue, if any.
• method DeleteAll() as %Integer [ Language = cpp ]
DeleteAll will delete all associated queues.
InterProcessQueues are a shared object and they don't go away until they are deleted explicitly. After deletion any references to this object from the current job or any other job will fail. Returns the number of active nodes deleted. Raises an exception, if the object is not initialized, or deleted.
On destruction, it will cleanup all associated and active message Queues. (it invokes DeleteAll).
• method Get(timeout As %Integer = -1) as %Integer [ Language = cpp ]
Get method waits for the specified amount of time for any message arrival in the set. Returns the first Queued msg. The SessionNum property has the rcvd msg connection number.
It returns an empty string if it times out and sets SessionNum to 0
It returns an empty string if there are no members in the IPQ set and sets SessionNum to -1
• private method Init() [ Language = cpp ]
Init this IPQ set.
• method NextValueGet() as %String [ Language = cpp ]
NextValue property implementation.
• method NextValueTimeoutGet() as %Integer [ Language = cpp ]
NextValue property implementation.
• method NextValueTimeoutSet(%String) as %Integer [ Language = cpp ]
NextValue property implementation.
• method SessionNumGet() as %Integer [ Language = cpp ]
Last resecived msg source, -1 if the set is empty
• method SessionNumSet(%Integer) as %Integer [ Language = cpp ]
Cannot change this property