DBD::Gofer::Transport::Base - base class for DBD::Gofer client transports
my $remote_dsn = "..." DBI->connect("dbi:Gofer:transport=...;url=...;timeout=...;retry_limit=...;dsn=$remote_dsn",...)
or, enable by setting the DBI_AUTOPROXY environment variable:
export DBI_AUTOPROXY='dbi:Gofer:transport=...;url=...'
which will force all DBI connections to be made via that Gofer server.
When used in the DSN it must be the last element in the DSN string.
If a request needs to be resent then the timeout is restarted for each sending of a request and receiving of a response.
The subroutine is pass three parameters: the request object, the response object, and the transport object.
If it returns an undefined value then the default retry behaviour is used. See ``RETRY ON ERROR'' below.
If it returns a defined but false value then the request is not resent.
If it returns true value then the request is resent, so long as the number of retries does not exceed "go_retry_limit".
- Retry if the error was due to DBI_GOFER_RANDOM. See L<DBI::Gofer::Execute>.
- Retry if $request->is_idempotent returns true. See L<DBI::Gofer::Request>.
A retry won't be allowed if the number of previous retries has reached "go_retry_limit".
The trace is written using DBI->trace_msg() and so is written to the default DBI trace output, which is usually STDERR.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
and some example transports:
DBD::Gofer::Transport::stream
DBD::Gofer::Transport::http
DBI::Gofer::Transport::mod_perl
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |