PHP 클래스 Jamm\Memory\RedisServer

상속: implements Jamm\Memory\IRedisServer
파일 보기 프로젝트 열기: jamm/memory

보호된 프로퍼티들

프로퍼티 타입 설명
$connection

공개 메소드들

메소드 설명
Append ( $key, $value )
Auth ( $password )
BITCOUNT ( string $key, integer $start, integer $end ) : integer Count the number of set bits (population counting) in a string.
BITOP ( string $operation, string $destkey, string $key ) : integer Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.
BLPop ( $key, $timeout )
BRPop ( $key, $timeout )
BRPopLPush ( $source, $destination, $timeout )
CLIENT_GETNAME ( ) Get the current connection name
CLIENT_KILL ( $ip, $port ) : boolean The CLIENT KILL command closes a given client connection identified by ip:port.
CLIENT_LIST ( ) Get the list of client connections
CLIENT_SETNAME ( string $connection_name ) : boolean Set the current connection name
Config_Get ( $parameter )
Config_ResetStat ( )
Config_Set ( $parameter, $value )
DBsize ( )
DEBUG_OBJECT ( string $key ) : mixed Get debugging information about a key
DEBUG_SEGFAULT ( ) Make the server crash
DUMP ( string $key ) : string Serialize the value stored at key in a Redis-specific format and return it to the user.
Decr ( $key )
DecrBy ( $key, $decrement )
Del ( $key )
Discard ( )
ECHO_ ( string $message ) : string Echo the given string
EVALSHA ( $sha1, array $keys, array $args ) : mixed Execute a Lua script server side
EVAL_ ( string $script, array $keys, array $args ) : mixed Execute a Lua script server side
Exec ( )
Exists ( $key )
Expire ( $key, $seconds )
Expireat ( $key, $timestamp )
FlushAll ( )
FlushDB ( )
Get ( $key )
GetBit ( $key, $offset )
GetRange ( $key, $start, $end )
GetSet ( $key, $value )
HINCRBYFLOAT ( string $key, string $field, float $increment ) : float Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment.
INCRBYFLOAT ( string $key, float $increment ) : float Increment the string representing a floating point number stored at key by the specified increment.
Incr ( $key )
IncrBy ( $key, $increment )
Info ( )
Keys ( $pattern )
LASTSAVE ( ) Get the UNIX time stamp of the last successful save to disk Ping the server
LIndex ( $key, $index )
LInsert ( $key, $after = true, $pivot, $value )
LLen ( $key )
LPop ( $key )
LPush ( $key, $value )
LPushX ( $key, $value )
LRange ( $key, $start, $stop )
LRem ( $key, $count, $value )
LSet ( $key, $index, $value )
LTrim ( $key, $start, $stop )
MGet ( $key )
MIGRATE ( string $host, string $port, string $key, integer $destination_db, integer $timeout ) : boolean Atomically transfer a key from a Redis instance to another one.
MONITOR ( ) Listen for all requests received by the server in real time
MSet ( array $keys )
MSetNX ( array $keys )
Move ( $key, $db )
Multi ( )
OBJECT ( string $subcommand, array $arguments = [] ) : mixed Inspect the internals of Redis objects
PEXPIRE ( string $key, integer $milliseconds ) : integer Set a key's time to live in milliseconds
PEXPIREAT ( string $key, integer $milliseconds_timestamp ) : integer Set the expiration for a key as a UNIX timestamp specified in milliseconds
PING ( ) Ping the server
PSETEX ( string $key, integer $milliseconds, string $value ) : boolean Set the value and expiration in milliseconds of a key
PSubscribe ( $pattern )
PTTL ( string $key ) : integer Get the time to live for a key in milliseconds
PUnsubscribe ( $pattern = null )
Persist ( $key )
Publish ( $channel, $message )
Quit ( )
RANDOMKEY ( ) Return a random key from the keyspace
RESTORE ( string $key, integer $ttl, string $serialized_value ) : boolean Create a key using the provided serialized value, previously obtained using DUMP.
RPop ( $key )
RPopLPush ( $source, $destination )
RPush ( $key, $value )
RPushX ( $key, $value )
Rename ( $key, $newkey )
RenameNX ( $key, $newkey )
SAVE ( ) Synchronously save the dataset to disk
SCRIPT_EXISTS ( string $script ) : array Check existence of scripts in the script cache.
SCRIPT_FLUSH ( ) Remove all the scripts from the script cache.
SCRIPT_KILL ( ) Kills the currently executing Lua script, assuming no write operation was yet performed by the script.
SCRIPT_LOAD ( string $script ) : string Load a script into the scripts cache, without executing it.
SHUTDOWN ( boolean $save = false, boolean $nosave = false ) : boolean Synchronously save the dataset to disk and then shut down the server One of modifiers can be turned on:
SLOWLOG ( string $subcommand, string $argument = '' ) : mixed Manages the Redis slow queries log
SPOP ( string $key ) : string Remove and return a random member from a set
SRANDMEMBER ( string $key, integer $count = 1 ) : string Get a random member from a set
SYNC ( ) Internal command used for replication
Select ( $index )
Set ( $key, $value )
SetBit ( $key, $offset, $value )
SetEx ( $key, $seconds, $value )
SetNX ( $key, $value )
SetRange ( $key, $offset, $value )
SlaveOf ( $host, $port )
Sort ( $key, $sort_rule )
StrLen ( $key )
Subscribe ( $channel )
TIME ( ) : array Returns the current server time as a two items lists: a Unix timestamp and the amount of microseconds already elapsed in the current second
TTL ( $key )
Type ( $key )
Unsubscribe ( $channel = '' )
Unwatch ( )
Watch ( $key )
__call ( $name, $args ) * If some command is not wrapped.
__construct ( $host = 'localhost', $port = '6379' )
__destruct ( ) Close connection
bgRewriteAOF ( )
bgSave ( )
connect ( $host, $port )
hDel ( $key, $field )
hExists ( $key, $field )
hGet ( $key, $field )
hGetAll ( $key )
hIncrBy ( $key, $field, $increment )
hKeys ( $key )
hLen ( $key )
hMGet ( $key, array $fields )
hMSet ( $key, $fields )
hSet ( $key, $field, $value )
hSetNX ( $key, $field, $value )
hVals ( $key )
sAdd ( $key, $member )
sCard ( $key )
sDiff ( $key )
sDiffStore ( $destination, $key )
sInter ( $key )
sInterStore ( $destination, $key )
sIsMember ( $key, $member )
sMembers ( $key )
sMove ( $source, $destination, $member )
sRem ( $key, $member )
sUnion ( $key )
sUnionStore ( $destination, $key )
send_command ( ) : array | boolean | integer | null | string Execute send_command and return the result Each entity of the send_command should be passed as argument Example: send_command('set','key','example value'); or: send_command('multi'); send_command('config','ResetStat'); // if command contain 2 words, they should be separated send_command('set','a', serialize($arr)); send_command('set','b', 1); send_command('execute');
zAdd ( $key, $score, $member = NULL )
zCard ( $key )
zCount ( $key, $min, $max )
zIncrBy ( $key, $increment, $member )
zInterStore ( $destination, array $keys, array $weights = null, $aggregate = null )
zRange ( $key, $start, $stop, $withscores = false )
zRangeByScore ( $key, $min, $max, $withscores = false, array $limit = null )
zRank ( $key, $member )
zRem ( $key, $member )
zRemRangeByRank ( $key, $start, $stop )
zRemRangeByScore ( $key, $min, $max )
zRevRange ( $key, $start, $stop, $withscores = false )
zRevRangeByScore ( $key, $max, $min, $withscores = false, array $limit = null )
zRevRank ( $key, $member )
zScore ( $key, $member )
zUnionStore ( $destination, array $keys, array $weights = null, $aggregate = null )

보호된 메소드들

메소드 설명
_read_reply ( )
_send ( $args )
reportError ( $msg )

메소드 상세

Append() 공개 메소드

public Append ( $key, $value )

Auth() 공개 메소드

public Auth ( $password )

BITCOUNT() 공개 메소드

By default all the bytes contained in the string are examined. It is possible to specify the counting operation only in an interval passing the additional arguments start and end.
public BITCOUNT ( string $key, integer $start, integer $end ) : integer
$key string
$start integer
$end integer
리턴 integer

BITOP() 공개 메소드

The BITOP command supports four bitwise operations: AND, OR, XOR and NOT, thus the valid forms to call the command are: BITOP AND destkey srckey1 srckey2 srckey3 ... srckeyN BITOP OR destkey srckey1 srckey2 srckey3 ... srckeyN BITOP XOR destkey srckey1 srckey2 srckey3 ... srckeyN BITOP NOT destkey srckey As you can see NOT is special as it only takes an input key, because it performs inversion of bits so it only makes sense as an unary operator. The result of the operation is always stored at destkey.
public BITOP ( string $operation, string $destkey, string $key ) : integer
$operation string
$destkey string
$key string
리턴 integer

BLPop() 공개 메소드

public BLPop ( $key, $timeout )

BRPop() 공개 메소드

public BRPop ( $key, $timeout )

BRPopLPush() 공개 메소드

public BRPopLPush ( $source, $destination, $timeout )

CLIENT_GETNAME() 공개 메소드

Get the current connection name
public CLIENT_GETNAME ( )

CLIENT_KILL() 공개 메소드

The ip:port should match a line returned by the CLIENT LIST command.
public CLIENT_KILL ( $ip, $port ) : boolean
$ip
$port
리턴 boolean

CLIENT_LIST() 공개 메소드

Get the list of client connections
public CLIENT_LIST ( )

CLIENT_SETNAME() 공개 메소드

Set the current connection name
public CLIENT_SETNAME ( string $connection_name ) : boolean
$connection_name string
리턴 boolean

Config_Get() 공개 메소드

public Config_Get ( $parameter )

Config_ResetStat() 공개 메소드

public Config_ResetStat ( )

Config_Set() 공개 메소드

public Config_Set ( $parameter, $value )

DBsize() 공개 메소드

public DBsize ( )

DEBUG_OBJECT() 공개 메소드

Get debugging information about a key
public DEBUG_OBJECT ( string $key ) : mixed
$key string
리턴 mixed

DEBUG_SEGFAULT() 공개 메소드

Make the server crash
public DEBUG_SEGFAULT ( )

DUMP() 공개 메소드

The returned value can be synthesized back into a Redis key using the RESTORE command.
public DUMP ( string $key ) : string
$key string
리턴 string

Decr() 공개 메소드

public Decr ( $key )

DecrBy() 공개 메소드

public DecrBy ( $key, $decrement )

Del() 공개 메소드

public Del ( $key )

Discard() 공개 메소드

public Discard ( )

ECHO_() 공개 메소드

Echo the given string
public ECHO_ ( string $message ) : string
$message string
리턴 string

EVALSHA() 공개 메소드

Execute a Lua script server side
public EVALSHA ( $sha1, array $keys, array $args ) : mixed
$sha1
$keys array
$args array
리턴 mixed

EVAL_() 공개 메소드

Execute a Lua script server side
public EVAL_ ( string $script, array $keys, array $args ) : mixed
$script string
$keys array
$args array
리턴 mixed

Exec() 공개 메소드

public Exec ( )

Exists() 공개 메소드

public Exists ( $key )

Expire() 공개 메소드

public Expire ( $key, $seconds )

Expireat() 공개 메소드

public Expireat ( $key, $timestamp )

FlushAll() 공개 메소드

public FlushAll ( )

FlushDB() 공개 메소드

public FlushDB ( )

Get() 공개 메소드

public Get ( $key )

GetBit() 공개 메소드

public GetBit ( $key, $offset )

GetRange() 공개 메소드

public GetRange ( $key, $start, $end )

GetSet() 공개 메소드

public GetSet ( $key, $value )

HINCRBYFLOAT() 공개 메소드

If the field does not exist, it is set to 0 before performing the operation.
public HINCRBYFLOAT ( string $key, string $field, float $increment ) : float
$key string
$field string
$increment float
리턴 float the value of field after the increment

INCRBYFLOAT() 공개 메소드

If the key does not exist, it is set to 0 before performing the operation.
public INCRBYFLOAT ( string $key, float $increment ) : float
$key string
$increment float
리턴 float the value of key after the increment

Incr() 공개 메소드

public Incr ( $key )

IncrBy() 공개 메소드

public IncrBy ( $key, $increment )

Info() 공개 메소드

public Info ( )

Keys() 공개 메소드

public Keys ( $pattern )

LASTSAVE() 공개 메소드

Get the UNIX time stamp of the last successful save to disk Ping the server
public LASTSAVE ( )

LIndex() 공개 메소드

public LIndex ( $key, $index )

LInsert() 공개 메소드

public LInsert ( $key, $after = true, $pivot, $value )

LLen() 공개 메소드

public LLen ( $key )

LPop() 공개 메소드

public LPop ( $key )

LPush() 공개 메소드

public LPush ( $key, $value )

LPushX() 공개 메소드

public LPushX ( $key, $value )

LRange() 공개 메소드

public LRange ( $key, $start, $stop )

LRem() 공개 메소드

public LRem ( $key, $count, $value )

LSet() 공개 메소드

public LSet ( $key, $index, $value )

LTrim() 공개 메소드

public LTrim ( $key, $start, $stop )

MGet() 공개 메소드

public MGet ( $key )

MIGRATE() 공개 메소드

On success the key is deleted from the original instance and is guaranteed to exist in the target instance. The command is atomic and blocks the two instances for the time required to transfer the key, at any given time the key will appear to exist in a given instance or in the other instance, unless a timeout error occurs.
public MIGRATE ( string $host, string $port, string $key, integer $destination_db, integer $timeout ) : boolean
$host string
$port string
$key string
$destination_db integer
$timeout integer
리턴 boolean

MONITOR() 공개 메소드

Listen for all requests received by the server in real time
public MONITOR ( )

MSet() 공개 메소드

public MSet ( array $keys )
$keys array

MSetNX() 공개 메소드

public MSetNX ( array $keys )
$keys array

Move() 공개 메소드

public Move ( $key, $db )

Multi() 공개 메소드

public Multi ( )

OBJECT() 공개 메소드

Inspect the internals of Redis objects
public OBJECT ( string $subcommand, array $arguments = [] ) : mixed
$subcommand string
$arguments array
리턴 mixed

PEXPIRE() 공개 메소드

Set a key's time to live in milliseconds
public PEXPIRE ( string $key, integer $milliseconds ) : integer
$key string
$milliseconds integer
리턴 integer 1 if the timeout was set, 0 if key does not exist or the timeout could not be set.

PEXPIREAT() 공개 메소드

Set the expiration for a key as a UNIX timestamp specified in milliseconds
public PEXPIREAT ( string $key, integer $milliseconds_timestamp ) : integer
$key string
$milliseconds_timestamp integer the Unix time at which the key will expire
리턴 integer 1 if the timeout was set, 0 if key does not exist or the timeout could not be set.

PING() 공개 메소드

Ping the server
public PING ( )

PSETEX() 공개 메소드

Set the value and expiration in milliseconds of a key
public PSETEX ( string $key, integer $milliseconds, string $value ) : boolean
$key string
$milliseconds integer
$value string
리턴 boolean

PSubscribe() 공개 메소드

public PSubscribe ( $pattern )

PTTL() 공개 메소드

Get the time to live for a key in milliseconds
public PTTL ( string $key ) : integer
$key string
리턴 integer Time to live in milliseconds or -1 when key does not exist or does not have a timeout.

PUnsubscribe() 공개 메소드

public PUnsubscribe ( $pattern = null )

Persist() 공개 메소드

public Persist ( $key )

Publish() 공개 메소드

public Publish ( $channel, $message )

Quit() 공개 메소드

public Quit ( )

RANDOMKEY() 공개 메소드

Return a random key from the keyspace
public RANDOMKEY ( )

RESTORE() 공개 메소드

Create a key using the provided serialized value, previously obtained using DUMP.
public RESTORE ( string $key, integer $ttl, string $serialized_value ) : boolean
$key string
$ttl integer If ttl is 0 the key is created without any expire, otherwise the specified expire time (in milliseconds) is set.
$serialized_value string
리턴 boolean

RPop() 공개 메소드

public RPop ( $key )

RPopLPush() 공개 메소드

public RPopLPush ( $source, $destination )

RPush() 공개 메소드

public RPush ( $key, $value )

RPushX() 공개 메소드

public RPushX ( $key, $value )

Rename() 공개 메소드

public Rename ( $key, $newkey )

RenameNX() 공개 메소드

public RenameNX ( $key, $newkey )

SAVE() 공개 메소드

Synchronously save the dataset to disk
public SAVE ( )

SCRIPT_EXISTS() 공개 메소드

Check existence of scripts in the script cache.
public SCRIPT_EXISTS ( string $script ) : array
$script string
리턴 array

SCRIPT_FLUSH() 공개 메소드

Remove all the scripts from the script cache.
public SCRIPT_FLUSH ( )

SCRIPT_KILL() 공개 메소드

Kills the currently executing Lua script, assuming no write operation was yet performed by the script.
public SCRIPT_KILL ( )

SCRIPT_LOAD() 공개 메소드

After the specified command is loaded into the script cache it will be callable using EVALSHA with the correct SHA1 digest of the script, exactly like after the first successful invocation of EVAL.
public SCRIPT_LOAD ( string $script ) : string
$script string
리턴 string This command returns the SHA1 digest of the script added into the script cache.

SHUTDOWN() 공개 메소드

Synchronously save the dataset to disk and then shut down the server One of modifiers can be turned on:
public SHUTDOWN ( boolean $save = false, boolean $nosave = false ) : boolean
$save boolean will force a DB saving operation even if no save points are configured.
$nosave boolean will prevent a DB saving operation even if one or more save points are configured.
리턴 boolean

SLOWLOG() 공개 메소드

Manages the Redis slow queries log
public SLOWLOG ( string $subcommand, string $argument = '' ) : mixed
$subcommand string
$argument string
리턴 mixed

SPOP() 공개 메소드

Remove and return a random member from a set
public SPOP ( string $key ) : string
$key string
리턴 string

SRANDMEMBER() 공개 메소드

Get a random member from a set
public SRANDMEMBER ( string $key, integer $count = 1 ) : string
$key string
$count integer
리턴 string

SYNC() 공개 메소드

Internal command used for replication
public SYNC ( )

Select() 공개 메소드

public Select ( $index )

Set() 공개 메소드

public Set ( $key, $value )

SetBit() 공개 메소드

public SetBit ( $key, $offset, $value )

SetEx() 공개 메소드

public SetEx ( $key, $seconds, $value )

SetNX() 공개 메소드

public SetNX ( $key, $value )

SetRange() 공개 메소드

public SetRange ( $key, $offset, $value )

SlaveOf() 공개 메소드

public SlaveOf ( $host, $port )

Sort() 공개 메소드

public Sort ( $key, $sort_rule )

StrLen() 공개 메소드

public StrLen ( $key )

Subscribe() 공개 메소드

public Subscribe ( $channel )

TIME() 공개 메소드

Returns the current server time as a two items lists: a Unix timestamp and the amount of microseconds already elapsed in the current second
public TIME ( ) : array
리턴 array

TTL() 공개 메소드

public TTL ( $key )

Type() 공개 메소드

public Type ( $key )

Unsubscribe() 공개 메소드

public Unsubscribe ( $channel = '' )

Unwatch() 공개 메소드

public Unwatch ( )

Watch() 공개 메소드

public Watch ( $key )

__call() 공개 메소드

..
public __call ( $name, $args )

__construct() 공개 메소드

public __construct ( $host = 'localhost', $port = '6379' )

__destruct() 공개 메소드

Close connection
public __destruct ( )

_read_reply() 보호된 메소드

protected _read_reply ( )

_send() 보호된 메소드

protected _send ( $args )

bgRewriteAOF() 공개 메소드

public bgRewriteAOF ( )

bgSave() 공개 메소드

public bgSave ( )

connect() 공개 메소드

public connect ( $host, $port )

hDel() 공개 메소드

public hDel ( $key, $field )

hExists() 공개 메소드

public hExists ( $key, $field )

hGet() 공개 메소드

public hGet ( $key, $field )

hGetAll() 공개 메소드

public hGetAll ( $key )

hIncrBy() 공개 메소드

public hIncrBy ( $key, $field, $increment )

hKeys() 공개 메소드

public hKeys ( $key )

hLen() 공개 메소드

public hLen ( $key )

hMGet() 공개 메소드

public hMGet ( $key, array $fields )
$fields array

hMSet() 공개 메소드

public hMSet ( $key, $fields )

hSet() 공개 메소드

public hSet ( $key, $field, $value )

hSetNX() 공개 메소드

public hSetNX ( $key, $field, $value )

hVals() 공개 메소드

public hVals ( $key )

reportError() 보호된 메소드

protected reportError ( $msg )

sAdd() 공개 메소드

public sAdd ( $key, $member )

sCard() 공개 메소드

public sCard ( $key )

sDiff() 공개 메소드

public sDiff ( $key )

sDiffStore() 공개 메소드

public sDiffStore ( $destination, $key )

sInter() 공개 메소드

public sInter ( $key )

sInterStore() 공개 메소드

public sInterStore ( $destination, $key )

sIsMember() 공개 메소드

public sIsMember ( $key, $member )

sMembers() 공개 메소드

public sMembers ( $key )

sMove() 공개 메소드

public sMove ( $source, $destination, $member )

sRem() 공개 메소드

public sRem ( $key, $member )

sUnion() 공개 메소드

public sUnion ( $key )

sUnionStore() 공개 메소드

public sUnionStore ( $destination, $key )

send_command() 공개 메소드

Execute send_command and return the result Each entity of the send_command should be passed as argument Example: send_command('set','key','example value'); or: send_command('multi'); send_command('config','ResetStat'); // if command contain 2 words, they should be separated send_command('set','a', serialize($arr)); send_command('set','b', 1); send_command('execute');
public send_command ( ) : array | boolean | integer | null | string
리턴 array | boolean | integer | null | string

zAdd() 공개 메소드

public zAdd ( $key, $score, $member = NULL )

zCard() 공개 메소드

public zCard ( $key )

zCount() 공개 메소드

public zCount ( $key, $min, $max )

zIncrBy() 공개 메소드

public zIncrBy ( $key, $increment, $member )

zInterStore() 공개 메소드

public zInterStore ( $destination, array $keys, array $weights = null, $aggregate = null )
$keys array
$weights array

zRange() 공개 메소드

public zRange ( $key, $start, $stop, $withscores = false )

zRangeByScore() 공개 메소드

public zRangeByScore ( $key, $min, $max, $withscores = false, array $limit = null )
$limit array

zRank() 공개 메소드

public zRank ( $key, $member )

zRem() 공개 메소드

public zRem ( $key, $member )

zRemRangeByRank() 공개 메소드

public zRemRangeByRank ( $key, $start, $stop )

zRemRangeByScore() 공개 메소드

public zRemRangeByScore ( $key, $min, $max )

zRevRange() 공개 메소드

public zRevRange ( $key, $start, $stop, $withscores = false )

zRevRangeByScore() 공개 메소드

public zRevRangeByScore ( $key, $max, $min, $withscores = false, array $limit = null )
$limit array

zRevRank() 공개 메소드

public zRevRank ( $key, $member )

zScore() 공개 메소드

public zScore ( $key, $member )

zUnionStore() 공개 메소드

public zUnionStore ( $destination, array $keys, array $weights = null, $aggregate = null )
$keys array
$weights array

프로퍼티 상세

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

protected $connection