KVStore
About 2 min
KVStore
- Full name:
\Hazaar\Warlock\Server\KVStore
Properties
log
private \Hazaar\Warlock\Server\Logger $log
kvStore
private array<string,array<string,mixed>> $kvStore
kvExpire
private array<string,array<int,string[]>> $kvExpire
db
private ?\Hazaar\File\BTree $db
compactTime
private int $compactTime
lastCompact
private int $lastCompact
Methods
__construct
public __construct(\Hazaar\Warlock\Server\Logger $log, bool $persistent = false, ?int $compactTime = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$log | \Hazaar\Warlock\Server\Logger | |
$persistent | bool | |
$compactTime | ?int |
expireKeys
public expireKeys(): void
touch
public touch(string $namespace, string $key): array<string,mixed>
Parameters:
Parameter | Type | Description |
---|---|---|
$namespace | string | |
$key | string |
process
public process(\Hazaar\Warlock\Server\Client $client, string $command, mixed& $payload): ?bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$command | string | |
$payload | mixed |
get
public get(\Hazaar\Warlock\Server\Client $client, mixed $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | mixed | |
$namespace | string |
set
public set(\Hazaar\Warlock\Server\Client $client, mixed $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | mixed | |
$namespace | string |
has
public has(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
del
public del(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
list
public list(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
clear
public clear(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
pull
public pull(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
push
public push(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
pop
public pop(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
shift
public shift(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
unshift
public unshift(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
count
public count(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
incr
public incr(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
decr
public decr(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
keys
public keys(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
values
public values(\Hazaar\Warlock\Server\Client $client, \stdClass $payload, string $namespace): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$client | \Hazaar\Warlock\Server\Client | |
$payload | \stdClass | |
$namespace | string |
Automatically generated on 2024-11-14