PHP 인터페이스 bandwidthThrottle\tokenBucket\storage\Storage

The storage determines the scope for the token bucket. It therefore implements one of the *Scope marker interfaces: - {@link RequestScope}: The bucket is shared only within one request. - {@link SessionScope}: The bucket is shared between requests of one session. - {@link GlobalScope}: The bucket is shared among all processes.
저자: Markus Malkusch ([email protected])
파일 보기 프로젝트 열기: bandwidth-throttle/token-bucket

공개 메소드들

메소드 설명
bootstrap ( double $microtime ) Bootstraps the storage.
getMicrotime ( ) : double Returns the stored timestamp.
getMutex ( ) : Mutex Returns the Mutex for this storage.
isBootstrapped ( ) : boolean Returns if the storage was already bootstrapped.
remove ( ) Removes the storage.
setMicrotime ( double $microtime ) Stores a timestamp.

메소드 상세

bootstrap() 공개 메소드

Bootstraps the storage.
public bootstrap ( double $microtime )
$microtime double The timestamp.

getMicrotime() 공개 메소드

Returns the stored timestamp.
public getMicrotime ( ) : double
리턴 double The timestamp.

getMutex() 공개 메소드

Returns the Mutex for this storage.
public getMutex ( ) : Mutex
리턴 malkusch\lock\mutex\Mutex The mutex.

isBootstrapped() 공개 메소드

Returns if the storage was already bootstrapped.
public isBootstrapped ( ) : boolean
리턴 boolean True if the storage was already bootstrapped.

remove() 공개 메소드

After a storage was removed you should not use that object anymore. The only defined methods after that operations are isBootstrapped() and bootstrap(). A call to bootstrap() results in a defined object again.
public remove ( )

setMicrotime() 공개 메소드

Stores a timestamp.
public setMicrotime ( double $microtime )
$microtime double The timestamp.