2018-07-09 09:55:12 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Amp\Sql;
|
|
|
|
|
|
|
|
interface TransientResource
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Indicates if the resource is still valid.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isAlive(): bool;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the timestamp of the last usage of this resource.
|
|
|
|
*
|
2018-09-13 20:51:10 +02:00
|
|
|
* @return int Unix timestamp in seconds.
|
2018-07-09 09:55:12 +02:00
|
|
|
*/
|
2018-09-13 20:51:10 +02:00
|
|
|
public function getLastUsedAt(): int;
|
2018-07-09 09:55:12 +02:00
|
|
|
}
|