X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FReplicated%2FPool.pm;h=bf46823419a2f5d4eb26fbdc35996a9e1b54fadf;hb=6834cc1d0449dfc1f528a1b9ecaf4f1a98ae0794;hp=4f406c3333835b117efc06eea75424bdf69e174f;hpb=7edf5f1cd3b097de79d262ed02d65128336f5893;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm b/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm index 4f406c3..bf46823 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm @@ -43,6 +43,25 @@ has 'maximum_lag' => ( default=>0, ); +=head2 last_validated + +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 time +builtin. + +=cut + +has 'last_validated' => ( + is=>'rw', + isa=>'Int', + reader=>'last_validated', + writer=>'_last_validated', + lazy=>1, + default=>sub { + 0; + }, +); + =head2 replicant_type ($classname) Base class used to instantiate replicants that are in the pool. Unless you @@ -229,6 +248,9 @@ sub validate_replicants { $replicant->active(0); } } + + ## Mark that we completed this validation. + $self->_last_validated(time); } =head1 AUTHOR