PHP Class bandwidthThrottle\tokenBucket\storage\PredisStorage

This storage is in the global scope.
Author: Markus Malkusch ([email protected])
Inheritance: implements bandwidthThrottle\tokenBucket\storage\Storage, implements bandwidthThrottle\tokenBucket\storage\scope\GlobalScope
Show file Open project: bandwidth-throttle/token-bucket Class Usage Examples

Public Methods

Method Description
__construct ( string $name, Client $redis ) Sets the Redis API.
bootstrap ( $microtime )
getMicrotime ( )
getMutex ( )
isBootstrapped ( )
remove ( )
setMicrotime ( $microtime )

Method Details

__construct() public method

Sets the Redis API.
public __construct ( string $name, Client $redis )
$name string The resource name.
$redis Predis\Client The Redis API.

bootstrap() public method

public bootstrap ( $microtime )

getMicrotime() public method

public getMicrotime ( )

getMutex() public method

public getMutex ( )

isBootstrapped() public method

public isBootstrapped ( )

remove() public method

public remove ( )

setMicrotime() public method

public setMicrotime ( $microtime )