class TableState

Methods

__construct(string $name, Table $table, StripedLock $locks)

Create a new Swoole rate limiter table state.

string
name()

Get the configured store name.

Table
table()

Get the shared Swoole table.

mixed
withLock(string $key, callable $callback)

Run the callback while holding the lock for a physical limiter key.

mixed
withLocks(array $keys, callable $callback)

Run the callback while holding the locks for a group of limiter keys.

Details

at line 15
__construct(string $name, Table $table, StripedLock $locks)

Create a new Swoole rate limiter table state.

Parameters

string $name
Table $table
StripedLock $locks

at line 25
string name()

Get the configured store name.

Return Value

string

at line 33
Table table()

Get the shared Swoole table.

Return Value

Table

at line 45
mixed withLock(string $key, callable $callback)

Run the callback while holding the lock for a physical limiter key.

Parameters

string $key
callable $callback

Return Value

mixed

at line 58
mixed withLocks(array $keys, callable $callback)

Run the callback while holding the locks for a group of limiter keys.

Parameters

array $keys
callable $callback

Return Value

mixed