PHP 클래스 Jenner\SimpleFork\Queue\RedisQueue

상속: implements Jenner\SimpleFork\Queue\QueueInterface
파일 보기 프로젝트 열기: huyanping/simple-fork-php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$channel redis key of queue
$redis Redis

공개 메소드들

메소드 설명
__construct ( string $host = '127.0.0.1', integer $port = 6379, integer $database, string $channel = 'cache', string $prefix = 'simple-fork-' )
__destruct ( ) close the connection
close ( ) close the connection
get ( boolean $block = false ) : boolean | string get value from the queue
put ( $value ) : boolean put value into the queue
remove ( ) : mixed remove the queue resource
size ( ) : integer get the size of the queue

메소드 상세

__construct() 공개 메소드

public __construct ( string $host = '127.0.0.1', integer $port = 6379, integer $database, string $channel = 'cache', string $prefix = 'simple-fork-' )
$host string redis server host
$port integer redis server port
$database integer redis server database num
$channel string redis queue key
$prefix string prefix of redis queue key

__destruct() 공개 메소드

close the connection
public __destruct ( )

close() 공개 메소드

close the connection
public close ( )

get() 공개 메소드

get value from the queue
public get ( boolean $block = false ) : boolean | string
$block boolean if block when the queue is empty
리턴 boolean | string

put() 공개 메소드

put value into the queue
public put ( $value ) : boolean
$value
리턴 boolean

remove() 공개 메소드

remove the queue resource
public remove ( ) : mixed
리턴 mixed

size() 공개 메소드

get the size of the queue
public size ( ) : integer
리턴 integer

프로퍼티 상세

$channel 보호되어 있는 프로퍼티

redis key of queue
protected $channel

$redis 보호되어 있는 프로퍼티

protected Redis $redis
리턴 Redis