TableState
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.
at line 25
string
name()
Get the configured store name.
at line 33
Table
table()
Get the shared Swoole table.
at line 45
mixed
withLock(string $key, callable $callback)
Run the callback while holding the lock for a physical limiter key.
at line 58
mixed
withLocks(array $keys, callable $callback)
Run the callback while holding the locks for a group of limiter keys.