PHP Class Swarrot\Driver\PrefetchMessageCache

Inheritance: implements Swarrot\Driver\MessageCacheInterface
Show file Open project: swarrot/swarrot

Protected Properties

Property Type Description
$caches

Public Methods

Method Description
pop ( string $queueName ) : Swarrot\Broker\Message | null Get the next message in line. Or nothing if there is no more in the cache.
push ( string $queueName, Swarrot\Broker\Message $message ) Pushes a message to the end of the cache.

Protected Methods

Method Description
get ( string $queueName ) : SplQueue Create the queue cache internally if it doesn't yet exists.

Method Details

get() protected method

Create the queue cache internally if it doesn't yet exists.
protected get ( string $queueName ) : SplQueue
$queueName string
return SplQueue

pop() public method

Get the next message in line. Or nothing if there is no more in the cache.
public pop ( string $queueName ) : Swarrot\Broker\Message | null
$queueName string
return Swarrot\Broker\Message | null

push() public method

Pushes a message to the end of the cache.
public push ( string $queueName, Swarrot\Broker\Message $message )
$queueName string
$message Swarrot\Broker\Message

Property Details

$caches protected property

protected $caches