X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FReplicated%2FPool.pm;h=db38c42680a650c833dbdc15ecb7be1b83585ae2;hp=500f73929bc1f95172d24f1efdf71742bf1f410a;hb=48580715af3072905f2c71dc27e7f70f21a11338;hpb=7d8f64b992d1de9fd3eef9f1d5729ca74153922f diff --git a/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm b/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm index 500f739..db38c42 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm @@ -23,7 +23,7 @@ shouldn't need to create instances of this class. =head1 DESCRIPTION In a replicated storage type, there is at least one replicant to handle the -read only traffic. The Pool class manages this replicant, or list of +read-only traffic. The Pool class manages this replicant, or list of replicants, and gives some methods for querying information about their status. =head1 ATTRIBUTES @@ -53,7 +53,7 @@ has 'maximum_lag' => ( This is an integer representing a time since the last time the replicants were validated. It's nothing fancy, just an integer provided via the perl L -builtin. +built-in. =cut @@ -87,7 +87,7 @@ has 'replicant_type' => ( =head2 replicants A hashref of replicant, with the key being the dsn and the value returning the -actual replicant storage. For example if the $dsn element is something like: +actual replicant storage. For example, if the $dsn element is something like: "dbi:SQLite:dbname=dbfile" @@ -117,7 +117,7 @@ The number of replicants in the pool =item delete_replicant ($key) -removes the replicant under $key from the pool +Removes the replicant under $key from the pool =back @@ -268,7 +268,7 @@ The standard ensure_connected method with throw an exception should it fail to connect. For the master database this is desirable, but since replicants are allowed to fail, this behavior is not desirable. This method wraps the call to ensure_connected in an eval in order to catch any generated errors. That -way a slave can go completely offline (ie, the box itself can die) without +way a slave can go completely offline (e.g. the box itself can die) without bringing down your entire pool of databases. =cut @@ -365,7 +365,7 @@ defined by L. Replicants that fail any of these tests are set to inactive, and thus removed from the replication pool. This tests L, since a replicant that has been previous marked -as inactive can be reactived should it start to pass the validation tests again. +as inactive can be reactivated should it start to pass the validation tests again. See L for more about checking if a replicating connection is not following a master or is lagging.