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
Directory::Queue::Null(3) User Contributed Perl Documentation Directory::Queue::Null(3)

Directory::Queue::Null - object oriented interface to a null directory based queue

  use Directory::Queue::Null;
  $dirq = Directory::Queue::Null->new();
  foreach $count (1 .. 100) {
      $name = $dirq->add(... some data ...);
  }

The goal of this module is to offer a "null" queue system using the same API as the other directory queue implementations. The queue will behave like a black hole: added data will disappear immediately so the queue will therefore always appear empty.

This can be used for testing purposes or to discard data like one would do on Unix by redirecting output to "/dev/null".

Please refer to Directory::Queue for general information about directory queues.

The new() method can be used to create a Directory::Queue::Null object that will later be used to interact with the queue. No attributes are supported.

The following methods are available:
new()
return a new Directory::Queue::Null object (class method)
copy()
return a copy of the object
path()
return the queue toplevel path, that is "NULL"
id()
return a unique identifier for the queue, that is "NULL"
count()
return the number of elements in the queue, so always 0
first()
return the first element in the queue, so always an empty string
next()
return the next element in the queue, so always an empty string
add(DATA)
add the given data (it can be anything) to the queue, this does nothing
add_ref(REF)
add the given data reference to the queue, this does nothing
add_path(PATH)
add the given file (identified by its path) to the queue, this will therefore remove the file
purge()
purge the queue, this does nothing

The following methods are available to provide the same API as the other directory queue modules but they will always return an error as they cannot be legitimately called since the queue is always empty:

lock(ELEMENT)
unlock(ELEMENT)
touch(ELEMENT)
remove(ELEMENT)
get(ELEMENT)
get_ref(ELEMENT)
get_path(ELEMENT)

This module does not store any file.

Directory::Queue, Directory::Queue::Normal, Directory::Queue::Simple.

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

Copyright (C) CERN 2010-2021

2021-10-13 perl v5.32.1

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

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