update shared memory pool api

This commit is contained in:
yggverse 2024-07-17 12:52:27 +03:00
parent 3ff79cb0be
commit b18b9bb99e
3 changed files with 117 additions and 42 deletions

View file

@ -14,18 +14,37 @@ interface Pool
?string $namespace = null
);
public function init(
string $key,
int $size = 0xfffff,
string $flags = 'c',
int $mode = 0644,
): ?\Shmop;
public function read(
string $key,
int $start = 0,
int $count = 0
): ?string;
public function write(
string $key,
string $value,
int $offset = 0
): int;
public function delete(
string $key
): bool;
public function get(
string $key
): ?string;
): string;
public function set(
string $key,
?string $value = null,
string $flags = 'c',
int $offset = 0,
int $mode = 0644,
?string $encoding = null
): int;
?string $value = null
): void;
public function reset(): void;
}