line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MogileFS::Domain; |
2
|
21
|
|
|
21
|
|
131
|
use strict; |
|
21
|
|
|
|
|
48
|
|
|
21
|
|
|
|
|
685
|
|
3
|
21
|
|
|
21
|
|
121
|
use warnings; |
|
21
|
|
|
|
|
49
|
|
|
21
|
|
|
|
|
519
|
|
4
|
21
|
|
|
21
|
|
116
|
use MogileFS::Server; |
|
21
|
|
|
|
|
46
|
|
|
21
|
|
|
|
|
523
|
|
5
|
21
|
|
|
21
|
|
239
|
use MogileFS::Util qw(throw); |
|
21
|
|
|
|
|
50
|
|
|
21
|
|
|
|
|
8012
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
MogileFS::Domain - domain class. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new_from_args { |
14
|
0
|
|
|
0
|
0
|
|
my ($class, $args, $class_factory) = @_; |
15
|
0
|
|
|
|
|
|
return bless { |
16
|
|
|
|
|
|
|
class_factory => $class_factory, |
17
|
0
|
|
|
|
|
|
%{$args}, |
18
|
|
|
|
|
|
|
}, $class; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Instance methods: |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
0
|
|
sub id { $_[0]{dmid} } |
24
|
0
|
|
|
0
|
0
|
|
sub name { $_[0]{namespace} } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub has_files { |
27
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
28
|
0
|
0
|
|
|
|
|
return 1 if $Mgd::_T_DOM_HAS_FILES; |
29
|
0
|
|
|
|
|
|
return Mgd::get_store()->domain_has_files($self->id); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub classes { |
33
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
34
|
0
|
|
|
|
|
|
return $self->{class_factory}->get_all($self); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub class { |
38
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
39
|
0
|
|
|
|
|
|
return $self->{class_factory}->get_by_name($self, $_[0]); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub observed_fields { |
43
|
0
|
|
|
0
|
0
|
|
return {}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |