This commit is contained in:
2023-04-03 13:45:59 +08:00
parent 7d574e9172
commit ac588a6f6f
5 changed files with 217 additions and 169 deletions
+29 -1
View File
@@ -6,26 +6,54 @@ interface QueueInterface
{
/**
* @return bool
*/
public function isEmpty(): bool;
public function push(mixed $data, float $timeout = -1): bool;
/**
* @param mixed $data
* @param float $timeout
* @return void
*/
public function push(mixed $data, float $timeout = -1): void;
/**
* @param float $timeout
* @return mixed
*/
public function pop(float $timeout = -1): mixed;
/**
* @return array
*/
public function stats(): array;
/**
* @return bool
*/
public function close(): bool;
/**
* @return int
*/
public function length(): int;
/**
* @return bool
*/
public function isFull(): bool;
/**
* @return bool
*/
public function isClose(): bool;
}