class IdleConnectionMonitor

Check one idle connection at each interval, independently of borrowing activity.

Properties

protected Timer $timer
protected int|null $timerId
protected bool $started

Methods

__construct(ConnectionPool $pool, float $interval, Timer|null $timer = null)

Create a monitor with its own timer.

void
start()

Start checking idle connections until stopped or the worker exits.

void
stop()

Stop checking idle connections.

Details

at line 25
__construct(ConnectionPool $pool, float $interval, Timer|null $timer = null)

Create a monitor with its own timer.

Parameters

ConnectionPool $pool
float $interval
Timer|null $timer

at line 40
void start()

Start checking idle connections until stopped or the worker exits.

Return Value

void

at line 78
void stop()

Stop checking idle connections.

Return Value

void