PHP 클래스 bandwidthThrottle\tokenBucket\storage\MemcacheStorage

This storage is in the global scope.
사용 중단: 1.0.0 There's no support for the memcache extension under PHP-7. Consider using ext-mecached and {@link MemcachedStorage}. This storage will not be removed, however there's no guarantee that it will work. As soon as ext-memcache is available for PHP-7 the deprecation will be reverted.
저자: Markus Malkusch ([email protected])
상속: implements bandwidthThrottle\tokenBucket\storage\Storage, implements bandwidthThrottle\tokenBucket\storage\scope\GlobalScope
파일 보기 프로젝트 열기: bandwidth-throttle/token-bucket

공개 메소드들

메소드 설명
__construct ( string $name, Memcache $memcache ) Sets the connected memcache API and the token bucket name.
bootstrap ( $microtime )
getMicrotime ( )
getMutex ( )
isBootstrapped ( )
remove ( )
setMicrotime ( $microtime )

메소드 상세

__construct() 공개 메소드

The api needs to be connected already. I.e. Memcache::connect() was already called.
public __construct ( string $name, Memcache $memcache )
$name string The name of the shared token bucket.
$memcache Memcache The connected memcache API.

bootstrap() 공개 메소드

public bootstrap ( $microtime )

getMicrotime() 공개 메소드

public getMicrotime ( )

getMutex() 공개 메소드

public getMutex ( )

isBootstrapped() 공개 메소드

public isBootstrapped ( )

remove() 공개 메소드

public remove ( )

setMicrotime() 공개 메소드

public setMicrotime ( $microtime )