GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DIRECTORY::QUEUE::SET (3)

.ds Aq ’

NAME

Directory::Queue::Set - object oriented interface to a set of Directory::Queue objects

CONTENTS

SYNOPSIS



  use Directory::Queue;
  use Directory::Queue::Set;

  $dq1 = Directory::Queue->new(path => "/tmp/q1");
  $dq2 = Directory::Queue->new(path => "/tmp/q2");
  $dqset = Directory::Queue::Set->new($dq1, $dq2);

  ($dq, $elt) = $dqset->first();
  while ($dq) {
      # you can now process the element $elt of queue $dq...
      ($dq, $elt) = $dqset->next();
  }



DESCRIPTION

This module can be used to put different queues into a set and browse them as one queue. The elements from all queues are merged together and sorted independently from the queue they belong to.

This works both with Directory::Queue::Normal and Directory::Queue::Simple queues. Queues of different types can even be mixed.

METHODS

The following methods are available:
new([DIRQ...]) return a new Directory::Queue::Set object containing the given queue objects (class method)
add([DIRQ...]) add the given queue objects to the queue set; resetting the iterator
remove([DIRQ...]) remove the given queue objects from the queue set; resetting the iterator
first() return the first (queue, element) couple in the queue set, resetting the iterator; return an empty list if the queue is empty
next() return the next (queue, element) couple in the queue set; return an empty list if there is no next element
count() return the total number of elements in all the queues of the set

SEE ALSO

Directory::Queue.

AUTHOR

Lionel Cons <http://cern.ch/lionel.cons>

Copyright (C) CERN 2010-2013

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DIRECTORY::QUEUE::SET (3) 2013-05-21

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.