Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Replicated / Balancer / First.pm
CommitLineData
17b05c13 1package DBIx::Class::Storage::DBI::Replicated::Balancer::First;
2
17b05c13 3use Moose;
4with 'DBIx::Class::Storage::DBI::Replicated::Balancer';
41916570 5use namespace::clean -except => 'meta';
17b05c13 6
7=head1 NAME
8
21fc4719 9DBIx::Class::Storage::DBI::Replicated::Balancer::First - Just get the First Balancer
17b05c13 10
11=head1 SYNOPSIS
12
13This class is used internally by L<DBIx::Class::Storage::DBI::Replicated>. You
14shouldn't need to create instances of this class.
d4daee7b 15
17b05c13 16=head1 DESCRIPTION
17
18Given a pool (L<DBIx::Class::Storage::DBI::Replicated::Pool>) of replicated
19database's (L<DBIx::Class::Storage::DBI::Replicated::Replicant>), defines a
20method by which query load can be spread out across each replicant in the pool.
21
48580715 22This Balancer just gets whichever is the first replicant in the pool.
17b05c13 23
24=head1 ATTRIBUTES
25
26This class defines the following attributes.
27
28=head1 METHODS
29
30This class defines the following methods.
31
32=head2 next_storage
33
34Just get the first storage. Probably only good when you have one replicant.
35
36=cut
37
38sub next_storage {
64cdad22 39 return (shift->pool->active_replicants)[0];
17b05c13 40}
41
a2bd3796 42=head1 FURTHER QUESTIONS?
17b05c13 43
a2bd3796 44Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
17b05c13 45
a2bd3796 46=head1 COPYRIGHT AND LICENSE
17b05c13 47
a2bd3796 48This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
49by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
50redistribute it and/or modify it under the same terms as the
51L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
17b05c13 52
53=cut
54
c354902c 55__PACKAGE__->meta->make_immutable;
56
41916570 571;