View on
Paul Sturm > Tibco-Rv-1.15 > Tibco::Rv::QueueGroup



Annotate this POD

View/Report Bugs
Module Version: 1.05   Source  


Tibco::Rv::QueueGroup - Tibco Queue Group, queue managing object


   $queueGroup = new Tibco::Rv::QueueGroup;

   $queueGroup->add( $queue );

   while ( 1 ) { $queueGroup->dispatch }


A Tibco::Rv::QueueGroup manages a set of Queues.


$queueGroup = new Tibco::Rv::QueueGroup

Creates a Tibco::Rv::QueueGroup without any queues. Use a QueueGroup to manage a set of Queues, by adding and removing queues, and dispatching events across those queues.


$dispatcher = $queueGroup->createDispatcher( %args )
      name => $name,
      idleTimeout => $idleTimeout

Creates a Tibco::Rv::Dispatcher with this $queueGroup as the dispatchable. See the Dispatcher constructor for more details.

$queue = $queueGroup->createQueue( %args )
      policy => $policy,
      maxEvents => $maxEvents,
      discardAmount => $discardAmount,
      name => $name,
      priority => $priority,
      hook => undef

Creates a Tibco::Rv::Queue and adds it to this $queueGroup before returning it. See the Queue constructor for more info on the %arg parameters.

$queueGroup->add( $queue )

Add $queue to this group.

$queueGroup->remove( $queue )

Removes $queue from this group. Dies with a Tibco::Rv::INVALID_QUEUE Status message if $queue is not actually in this group.


Dispatch a single event. If there are no events currently on any of the queues, then this method blocks until an event arrives.

$status = $queueGroup->poll

Dispatch a single event if there is at least one event waiting any of the queues. If there are no events on any of the queues, then this call returns immediately. Returns a Tibco::Rv::OK Status object if an event was dispatched, or Tibco::Rv::TIMEOUT if there were no events on any queues.

$status = $queueGroup->timedDispatch( $timeout )

Dispatches a single event if there is at least one event waiting on any of the queues, or if an event arrives before $timeout seconds have passed. In either case, returns Tibco::Rv::OK. If $timeout is reached before dispatching an event, returns Tibco::Rv::TIMEOUT. If Tibco::Rv::WAIT_FOREVER is passed as $timeout, behaves the same as dispatch. If Tibco::Rv::NO_WAIT is passed as $timeout, behaves the same as poll.


Destroys the queue group, but all queues in the group continue to exist. Called automatically when $queueGroup goes out of scope. Calling DESTROY more than once has no effect.


Paul Sturm <>

syntax highlighting: