class SwooleTableManager

Properties

protected SwooleTableState> $states

The resolved Swoole table states.

protected bool $sealed

Methods

__construct(Container $app)

No description

createState(int $rows, int $bytes, float $conflictProportion, int $hashSeed = 0)

Create a Swoole table state.

createTable(int $rows, int $bytes, float $conflictProportion)

Create a Swoole table.

get(string $name)

Get a Swoole table state by name.

void
seal()

Prevent tables from being created after the server initialization phase.

resolve(string $name)

Resolve a Swoole table state by name.

array|null
getConfig(string $name)

Get the Swoole table configuration.

Details

at line 23
__construct(Container $app)

No description

Parameters

Container $app

at line 31
SwooleTableState createState(int $rows, int $bytes, float $conflictProportion, int $hashSeed = 0)

Create a Swoole table state.

Parameters

int $rows
int $bytes
float $conflictProportion
int $hashSeed

Return Value

SwooleTableState

at line 42
SwooleTable createTable(int $rows, int $bytes, float $conflictProportion)

Create a Swoole table.

Parameters

int $rows
int $bytes
float $conflictProportion

Return Value

SwooleTable

at line 59
SwooleTableState get(string $name)

Get a Swoole table state by name.

Parameters

string $name

Return Value

SwooleTableState

at line 80
void seal()

Prevent tables from being created after the server initialization phase.

Boot-only. Creating a table after the server forks would give each worker private state instead of one shared cache table.

Return Value

void

at line 88
protected SwooleTableState resolve(string $name)

Resolve a Swoole table state by name.

Parameters

string $name

Return Value

SwooleTableState

at line 106
protected array|null getConfig(string $name)

Get the Swoole table configuration.

Parameters

string $name

Return Value

array|null