line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Kafka::Message; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Kafka::Message - Interface to the Kafka message properties. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 VERSION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
This documentation refers to C version 1.07 . |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
6
|
|
|
6
|
|
70241
|
use 5.010; |
|
6
|
|
|
|
|
111
|
|
16
|
6
|
|
|
6
|
|
32
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
201
|
|
17
|
6
|
|
|
6
|
|
32
|
use warnings; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
583
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $VERSION = '1.07'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
our @_standard_fields = qw( |
28
|
|
|
|
|
|
|
Attributes |
29
|
|
|
|
|
|
|
Timestamp |
30
|
|
|
|
|
|
|
error |
31
|
|
|
|
|
|
|
HighwaterMarkOffset |
32
|
|
|
|
|
|
|
key |
33
|
|
|
|
|
|
|
MagicByte |
34
|
|
|
|
|
|
|
next_offset |
35
|
|
|
|
|
|
|
payload |
36
|
|
|
|
|
|
|
offset |
37
|
|
|
|
|
|
|
valid |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
#-- constructor ---------------------------------------------------------------- |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub new { |
43
|
15019
|
|
|
15019
|
1
|
20183
|
my ( $class, $self ) = @_; |
44
|
|
|
|
|
|
|
|
45
|
15019
|
|
|
|
|
15475
|
bless $self, $class; |
46
|
|
|
|
|
|
|
|
47
|
15019
|
|
|
|
|
29877
|
return $self; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
#-- public attributes ---------------------------------------------------------- |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
{ |
53
|
6
|
|
|
6
|
|
33
|
no strict 'refs'; ## no critic |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
549
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# getters |
56
|
|
|
|
|
|
|
foreach my $method ( @_standard_fields ) |
57
|
|
|
|
|
|
|
{ |
58
|
|
|
|
|
|
|
*{ __PACKAGE__.'::'.$method } = sub { |
59
|
30033
|
|
|
30033
|
|
108732
|
my ( $self ) = @_; |
60
|
30033
|
|
|
|
|
42404
|
return $self->{ $method }; |
61
|
|
|
|
|
|
|
}; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
#-- public methods ------------------------------------------------------------- |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
#-- private attributes --------------------------------------------------------- |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
#-- private methods ------------------------------------------------------------ |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
__END__ |