Connection
abstract class Connection implements Connection
Properties
| protected float | $lastUseTime | ||
| protected float | $lastReleaseTime | ||
| protected bool | $invalid |
Methods
void
release()
Release the connection back to the pool.
void
discard()
Discard the connection from its pool.
mixed
getConnection()
Get the underlying connection.
bool
check()
Check if the connection is still valid based on idle time.
float
getLastUseTime()
Get the last use time.
float
getLastReleaseTime()
Get the last release time.
void
markInvalid()
Mark the connection as invalid.
void
markValid()
Mark the connection as valid.
mixed
getActiveConnection()
Get the active connection, reconnecting if necessary.
Details
at line 27
__construct(Container $container, ConnectionPool $pool)
No description
at line 39
void
release()
Release the connection back to the pool.
at line 103
void
discard()
Discard the connection from its pool.
at line 111
mixed
getConnection()
Get the underlying connection.
at line 119
bool
check()
Check if the connection is still valid based on idle time.
at line 138
float
getLastUseTime()
Get the last use time.
at line 146
float
getLastReleaseTime()
Get the last release time.
at line 154
protected void
markInvalid()
Mark the connection as invalid.
at line 162
protected void
markValid()
Mark the connection as valid.
at line 170
abstract mixed
getActiveConnection()
Get the active connection, reconnecting if necessary.