1Directory::Queue::Null(U3s)er Contributed Perl DocumentatDiiornectory::Queue::Null(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

17       The goal of this module is to offer a "null" queue system using the
18       same API as the other directory queue implementations. The queue will
19       behave like a black hole: added data will disappear immediately so the
20       queue will therefore always appear empty.
21
22       This can be used for testing purposes or to discard data like one would
23       do on Unix by redirecting output to "/dev/null".
24
25       Please refer to Directory::Queue for general information about
26       directory queues.
27

CONSTRUCTOR

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

METHODS

34       The following methods are available:
35
36       new()
37           return a new Directory::Queue::Null object (class method)
38
39       copy()
40           return a copy of the object
41
42       path()
43           return the queue toplevel path, that is "NULL"
44
45       id()
46           return a unique identifier for the queue, that is "NULL"
47
48       count()
49           return the number of elements in the queue, so always 0
50
51       first()
52           return the first element in the queue, so always an empty string
53
54       next()
55           return the next element in the queue, so always an empty string
56
57       add(DATA)
58           add the given data (it can be anything) to the queue, this does
59           nothing
60
61       add_ref(REF)
62           add the given data reference to the queue, this does nothing
63
64       add_path(PATH)
65           add the given file (identified by its path) to the queue, this will
66           therefore remove the file
67
68       purge()
69           purge the queue, this does nothing
70
71       The following methods are available to provide the same API as the
72       other directory queue modules but they will always return an error as
73       they cannot be legitimately called since the queue is always empty:
74
75       lock(ELEMENT)
76       unlock(ELEMENT)
77       touch(ELEMENT)
78       remove(ELEMENT)
79       get(ELEMENT)
80       get_ref(ELEMENT)
81       get_path(ELEMENT)
82

DIRECTORY STRUCTURE

84       This module does not store any file.
85

SEE ALSO

87       Directory::Queue, Directory::Queue::Normal, Directory::Queue::Simple.
88

AUTHOR

90       Lionel Cons <http://cern.ch/lionel.cons>
91
92       Copyright (C) CERN 2010-2018
93
94
95
96perl v5.32.1                      2021-01-27         Directory::Queue::Null(3)
Impressum