DBIx::Class::Storage::DBI::Replicated::Balancer::Random - A 'random' Balancer
This class is used internally by DBIx::Class::Storage::DBI::Replicated. You shouldn't need to create instances of this class.
Given a pool (DBIx::Class::Storage::DBI::Replicated::Pool) of replicated database's (DBIx::Class::Storage::DBI::Replicated::Replicant), defines a method by which query load can be spread out across each replicant in the pool.
This Balancer uses List::Util keyword 'shuffle' to randomly pick an active replicant from the associated pool. This may or may not be random enough for you, patches welcome.
This class defines the following attributes.
This class defines the following methods.
Returns an active replicant at random. Please note that due to the nature of the word 'random' this means it's possible for a particular active replicant to be requested several times in a row.
John Napiorkowski <firstname.lastname@example.org>
You may distribute this code under the same terms as Perl itself.