getConnectionPoolSize()
getPoolSize()
instance()
invalidate()
manualConnectionFailover()
requestConnection()
__construct()
establishConnection()
$connectionParams
$connections
$instance
CRON
MASTER
SLAVE
Pool initializes and returns database connections.
package | Sporcle |
---|---|
subpackage | DBPool |
author | Dan Munro |
getConnectionPoolSize(int $instanceType) : int
int
The type of database connection to get the pool size for.
int
the number of available connectionsgetPoolSize(int $instanceType) : int
access | private |
---|
int
The type of database connection to get the pool size for.
int
the number of available connectionsinstance(int $instanceType) : \Sporcle\DB\mysqli
int
The type of database requested
\Sporcle\DB\mysqli
A mysqli connectioninvalidate(int $instanceType)
int
the type of database to force closed.
manualConnectionFailover(int $instanceType) : \Sporcle\DB\Mysqli
int
the type of database to force cycling the connection.
\Sporcle\DB\Mysqli
A newly opened connection to the database type requested.requestConnection(int $instanceType) : \Sporcle\DB\Mysqli
access | private |
---|
int
The type of database requested.
\Sporcle\DB\Mysqli
An open database connection.__construct()
access | private |
---|
establishConnection(int $instanceType) : \Sporcle\DB\Mysqli
Each request for a new connection will remove the parameters for that connection from the pool to prevent reconnecting to the same server (a disconnect/new connection should mean the original connection is no longer accessible or purposely cycled).
access | private |
---|
int
The type of database requested.
\Sporcle\DB\Mysqli
An open database connection.$connectionParams : array
$connections : array
$instance : \Sporcle\DB\DBPool
CRON
MASTER
SLAVE