},
);
+=head2 balancer_args
+
+Contains a hashref of initialized information to pass to the Balancer object.
+See L<DBIx::Class::Storage::Replicated::Pool> for available arguments.
+
+=cut
+
+has 'balancer_args' => (
+ is=>'ro',
+ isa=>'HashRef',
+);
+
=head2 pool
Is a <DBIx::Class::Storage::DBI::Replicated::Pool> or derived class. This is a
connect_replicants
replicants
has_replicants
- num_replicants
- delete_replicant
/],
);
is=>'ro',
isa=>'DBIx::Class::Storage::DBI::Replicated::Balancer',
lazy_build=>1,
+ handles=>[qw/auto_validate_every/],
);
=head2 master
=cut
sub _build_pool {
- shift->create_pool;
+ my $self = shift @_;
+ $self->create_pool;
}
=head2 _build_balancer_type
=cut
sub _build_balancer_type {
- return 'DBIx::Class::Storage::DBI::Replicated::Balancer';
+ return 'DBIx::Class::Storage::DBI::Replicated::Balancer::First';
}
=head2 _build_balancer
my $self = shift @_;
$self->create_balancer(
pool=>$self->pool,
- master=>$self->master);
+ master=>$self->master,
+ %{$self->balancer_args},);
}
=head2 _build_write_handler