PHP Класс bandwidthThrottle\tokenBucket\storage\PHPRedisStorage

This storage is in the global scope. This implementation requires at least phpredis-2.2.4.
Автор: Markus Malkusch ([email protected])
Наследование: implements bandwidthThrottle\tokenBucket\storage\Storage, implements bandwidthThrottle\tokenBucket\storage\scope\GlobalScope
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $name, Redis $redis ) Sets the connected Redis API.
bootstrap ( $microtime )
getMicrotime ( )
getMutex ( )
isBootstrapped ( )
remove ( )
setMicrotime ( $microtime )

Описание методов

__construct() публичный Метод

The Redis API needs to be connected yet. I.e. Redis::connect() was called already.
public __construct ( string $name, Redis $redis )
$name string The resource name.
$redis Redis The Redis API.

bootstrap() публичный Метод

public bootstrap ( $microtime )

getMicrotime() публичный Метод

public getMicrotime ( )

getMutex() публичный Метод

public getMutex ( )

isBootstrapped() публичный Метод

public isBootstrapped ( )

remove() публичный Метод

public remove ( )

setMicrotime() публичный Метод

public setMicrotime ( $microtime )