mirror of
https://github.com/predis/predis.git
synced 2026-09-05 15:42:31 +00:00
Added BLPOP and BRPOP.
This commit is contained in:
@@ -886,6 +886,19 @@ class RedisServer__V1_2 extends RedisServer__V1_0 {
|
||||
}
|
||||
}
|
||||
|
||||
class RedisServer__Futures extends RedisServer__V1_2 {
|
||||
public function getVersion() { return 0; }
|
||||
public function getSupportedCommands() {
|
||||
return array_merge(parent::getSupportedCommands(), array(
|
||||
/* commands operating on lists */
|
||||
'blpop' => '\Predis\Commands\ListPopFirstBlocking',
|
||||
'popFirstBlocking' => '\Predis\Commands\ListPopFirstBlocking',
|
||||
'brpop' => '\Predis\Commands\ListPopLastBlocking',
|
||||
'popLastBlocking' => '\Predis\Commands\ListPopLastBlocking'
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
namespace Predis\Utilities;
|
||||
@@ -1137,6 +1150,14 @@ class ListPopLast extends \Predis\InlineCommand {
|
||||
public function getCommandId() { return 'RPOP'; }
|
||||
}
|
||||
|
||||
class ListPopFirstBlocking extends \Predis\InlineCommand {
|
||||
public function getCommandId() { return 'BRPOP'; }
|
||||
}
|
||||
|
||||
class ListPopLastBlocking extends \Predis\InlineCommand {
|
||||
public function getCommandId() { return 'BRPOP'; }
|
||||
}
|
||||
|
||||
/* commands operating on sets */
|
||||
class SetAdd extends \Predis\BulkCommand {
|
||||
public function getCommandId() { return 'SADD'; }
|
||||
|
||||
Reference in New Issue
Block a user