line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MogileFS::Domain; |
2
|
21
|
|
|
21
|
|
96
|
use strict; |
|
21
|
|
|
|
|
30
|
|
|
21
|
|
|
|
|
641
|
|
3
|
21
|
|
|
21
|
|
85
|
use warnings; |
|
21
|
|
|
|
|
31
|
|
|
21
|
|
|
|
|
493
|
|
4
|
21
|
|
|
21
|
|
89
|
use MogileFS::Server; |
|
21
|
|
|
|
|
31
|
|
|
21
|
|
|
|
|
410
|
|
5
|
21
|
|
|
21
|
|
83
|
use MogileFS::Util qw(throw); |
|
21
|
|
|
|
|
32
|
|
|
21
|
|
|
|
|
4920
|
|
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; |