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 24
__construct(Container $app)

No description

Parameters

Container $app

at line 32
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 43
SwooleTable createTable(int $rows, int $bytes, float $conflictProportion)

Create a Swoole table.

Parameters

int $rows
int $bytes
float $conflictProportion

Return Value

SwooleTable

at line 60
SwooleTableState get(string $name)

Get a Swoole table state by name.

Parameters

string $name

Return Value

SwooleTableState

at line 81
void seal()

Prevent tables from being created after the server initialization phase.

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

Return Value

void

at line 90
protected SwooleTableState resolve(string $name)

Resolve a Swoole table state by name.

Parameters

string $name

Return Value

SwooleTableState

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

Get the Swoole table configuration.

Parameters

string $name

Return Value

array|null