line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MR::IProto::Request; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
MR::IProto::Request - request message |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Base class for all request messages. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
1231
|
use Mouse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
14
|
|
|
|
|
|
|
extends 'MR::IProto::Message'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has '+data' => ( |
17
|
|
|
|
|
|
|
lazy_build => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 PUBLIC METHODS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=over |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=item key |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Returns key value. |
27
|
|
|
|
|
|
|
You must reimplement this method in your subclass to use this feature. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub key { |
32
|
0
|
|
|
0
|
1
|
|
return undef; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=item retry |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
If request retry is allowed. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub retry { |
42
|
0
|
|
|
0
|
1
|
|
return 0; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=back |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 PROTECTED METHODS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=over |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item key_attr |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Class method which must return name of key attribute. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item _build_data |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
You B implement this method in you subclass to pack your object. |
58
|
|
|
|
|
|
|
Returns packed data. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub _build_data { |
63
|
0
|
|
|
0
|
|
|
return ''; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=back |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
1
|
|
|
1
|
|
268
|
no Mouse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
71
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |