PHP Class bandwidthThrottle\tokenBucket\storage\IPCStorage

This storage is in the global scope. However the scope is limited to the shared memory. I.e. the scope is not shared between hosts.
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

Public Methods

Method Description
__construct ( integer $key ) Sets the System V IPC key for the shared memory and its semaphore.
bootstrap ( $microtime )
getMicrotime ( )
getMutex ( )
isBootstrapped ( )
remove ( )
setMicrotime ( $microtime )

Private Methods

Method Description
attach ( ) Attaches the shared memory segment.

Method Details

__construct() public method

You can create the key with PHP's function ftok().
public __construct ( integer $key )
$key integer The System V IPC key.

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 )