PHP Class ManaPHP\Message\Queue\Adapter\Redis

Inheritance: extends ManaPHP\Component, implements ManaPHP\Message\QueueInterface
Show file Open project: manaphp/manaphp

Protected Properties

Property Type Description
$_prefix string
$_priorities int[]
$_topicKeys array[]

Public Methods

Method Description
__construct ( string | array $options = [] ) Redis constructor.
delete ( string $topic ) : void
length ( string $topic, integer $priority = null ) : integer
pop ( string $topic, integer $timeout = PHP_INT_MAX ) : string | false
push ( string $topic, string $body, integer $priority = self::PRIORITY_NORMAL )

Method Details

__construct() public method

Redis constructor.
public __construct ( string | array $options = [] )
$options string | array

delete() public method

public delete ( string $topic ) : void
$topic string
return void

length() public method

public length ( string $topic, integer $priority = null ) : integer
$topic string
$priority integer
return integer

pop() public method

public pop ( string $topic, integer $timeout = PHP_INT_MAX ) : string | false
$topic string
$timeout integer
return string | false

push() public method

public push ( string $topic, string $body, integer $priority = self::PRIORITY_NORMAL )
$topic string
$body string
$priority integer

Property Details

$_prefix protected property

protected string $_prefix
return string

$_priorities protected property

protected int[] $_priorities
return int[]

$_topicKeys protected property

protected array[] $_topicKeys
return array[]