|
ensembl-hive
2.7.0
|
Inheritance diagram for Bio::EnsEMBL::DBSQL::ProxyDBConnection:Public Member Functions | |
| public | new () |
| public | switch_database () |
| public | check_reconnection () |
| protected | _last_used () |
| protected | _require_reconnect () |
| public Int | reconnect_interval () |
| public String | dbname () |
| public | sql_helper () |
| protected | __resolver () |
Public Member Functions inherited from Bio::EnsEMBL::Utils::Proxy | |
| public Bio::EnsEMBL::Utils::Proxy | new () |
| protected Any | __proxy () |
| public Boolean | isa () |
| public Code | can () |
| public void | DESTROY () |
| public void | AUTOLOAD () |
| protected | __resolver () |
This class is used to maintain one active connection to a database whilst it appears to be working against multiple schemas. It does this by checking the currently connected database before performing any query which could require a database change such as prepare. This class is only intended for internal use so please do not use unless you are aware of what it will do and what the consequences of its usage are.
Definition at line 30 of file ProxyDBConnection.pm.
| protected Bio::EnsEMBL::DBSQL::ProxyDBConnection::__resolver | ( | ) |
Undocumented method
Code:
| protected Bio::EnsEMBL::DBSQL::ProxyDBConnection::_last_used | ( | ) |
Undocumented method
Code:
| protected Bio::EnsEMBL::DBSQL::ProxyDBConnection::_require_reconnect | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::DBSQL::ProxyDBConnection::check_reconnection | ( | ) |
Description : Looks to see if the last time we used the backing DBI
connection was greater than the reconnect_interval()
provided at construction or runtime. If enought time has
elapsed then a reconnection is attempted. We do not
attempt a reconnection if: Exceptions : None apart from those raised from the reconnect() method
from DBConnection
Code:
| public String Bio::EnsEMBL::DBSQL::ProxyDBConnection::dbname | ( | ) |
Arg[1] : String DB name
Description : Accessor for the name of the database we should use whenever
a DBConnection request is made via this class
Returntype : String the name of the database which we should use
Exceptions : None
Code:
| public Bio::EnsEMBL::DBSQL::ProxyDBConnection::new | ( | ) |
Undocumented method
Code:
| public Int Bio::EnsEMBL::DBSQL::ProxyDBConnection::reconnect_interval | ( | ) |
Arg[1] : Integer reconnection interval in milliseconds
Description : Accessor for the reconnection interval expressed in milliseconds
Returntype : Int miliseconds for a reconnection interval
Code:
| public Bio::EnsEMBL::DBSQL::ProxyDBConnection::sql_helper | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::DBSQL::ProxyDBConnection::switch_database | ( | ) |
Description : Performs a switch of the backing DBConnection if the currently connected database is not the same as the database this proxy wants to connect to. It currently supports MySQL, Oracle and Postges switches is untested with all bar MySQL. If it cannot do a live DB/schema switch then it will disconnect the connection and then wait for the next process to connect therefore switching the DB. Exceptions : None but will warn if you attempt to switch a DB with active kids attached to the proxied database handle.
Code: