root/perl/lib/JLog.pm

Revision adf2ee8486352700056029fde45a13fc81b71218, 2.3 kB (checked in by Wez Furlong <wez.furlong@messagesystems.com>, 6 years ago)

Sync with the ecelerity jlog sources

  • Property mode set to 100644
Line 
1 package JLog;
2
3 use 5.008005;
4 use strict;
5 use warnings;
6
7 require Exporter;
8
9 our @ISA = qw(Exporter);
10
11 # Items to export into callers namespace by default. Note: do not export
12 # names by default without a very good reason. Use EXPORT_OK instead.
13 # Do not simply export all your public functions/methods/constants.
14
15 # This allows declaration       use JLog ':all';
16 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
17 # will save memory.
18 our %EXPORT_TAGS = ( 'all' => [ qw(
19        
20 ) ] );
21
22 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
23
24 our @EXPORT = qw(
25        
26 );
27
28 our $VERSION = '1.0';
29
30 require XSLoader;
31 XSLoader::load('JLog', $VERSION);
32
33 # Preloaded methods go here.
34
35 1;
36 __END__
37
38 =head1 NAME
39
40 JLog - Perl extension for the jlog journaled queueing system
41
42 =head1 DESCRIPTION
43
44 Parent class for JLog::Reader and JLog::Writer.  You probably want to
45 be looking at those instead.  JLog is a durable, reliable,
46 publish-and-subscribe queueing system.
47
48 =head1 INTERFACE
49
50 =head2 Subscriber Management
51
52 A JLog must have subscribers to be functional.  Without a subscriber,
53 a queue may be purged, as there are no interested readers.  For this
54 reason it is highly recommended that you add a subscriber before
55 writing to a log.
56
57 =head3 add_subscriber
58
59   $w->add_subscriber( $name, [ $flag ] );
60
61 Add a subscriber to the JLog queue.
62
63 =over 4
64
65 =item $name
66
67 The name of the subscriber.
68
69 =item $flag
70
71 An optional flag dictating where the subscriber should be marked interested
72 from.  The default is JLog::JLOG_BEGIN.  The other available option is
73 JLog::JLOG_END.
74
75 =back
76
77 =head3 remove_subscriber
78
79   $w->remove_subscriber ( $name );
80
81 Remove a subscriber to the JLog queue.
82
83 =over 4
84
85 =item $name
86
87 The name of the subscriber.
88
89 =back
90
91 =head3 list_subscribers
92
93   @subscribers = $w->list_subscribers;
94
95 Return a list of all the subscribers to a JLog queue.
96
97 =head2 Internals
98
99 =head3 alter_journal_size
100
101 This function is a stub provided for backwards compatibility. It will always
102 return false.
103
104 =over 4
105
106 =item $size
107
108 The desired size in bytes.
109
110 =back
111
112 =head3 raw_size
113
114   $size = $w->raw_size;
115
116 The size of the existing journal (including checkpointed but unpurged messages
117 in the current journal file), in bytes.
118
119 =head1 SEE ALSO
120
121 JLog::Reader
122 JLog::Writer
123
124 =head1 COPYRIGHT AND LICENSE
125
126 Copyright (C) 2006-2008 by Message Systems, Inc.
127
128 =cut
Note: See TracBrowser for help on using the browser.