Phants Client for Redis™*
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CommandClient Class Reference
Inheritance diagram for CommandClient:
Inheritance graph
[legend]
Collaboration diagram for CommandClient:
Collaboration graph
[legend]

Public Member Functions

 CommandClient (string hostname, int port, int recvBufferLen, int sendBufferLen)
 
void Auth (SimpleStringSink sink, string password)
 
void Echo (BulkStringSink sink, string message)
 
void Ping (BulkStringSink sink, string message)
 
void Ping (SimpleStringSink sink)
 
void Quit (SimpleStringSink sink)
 
void Select (SimpleStringSink sink, int index)
 
void SwapDb (SimpleStringSink sink, int indexOne, int indexTwo)
 
void GeoAdd (IntegerSink sink, string key, params GeoCoord[] geoCoords)
 
void GeoAdd (IntegerSink sink, string key, string longitude, string latitude, string member)
 
void GeoDist (BulkStringSink sink, string key, string member1, string member2, GeoUnit unit)
 
void GeoDist (BulkStringSink sink, string key, string member1, string member2)
 
void GeoHash (ArraySink sink, string key, params string[] members)
 
void GeoPos (ArraySink sink, string key, params string[] members)
 
void GeoRadius (ArraySink sink, string key, string longitude, string latitude, string radius, GeoUnit unit, GeoFlags flags, GeoRadiusOptions options=null)
 
void GeoRadius (IntegerSink sink, string key, string longitude, string latitude, string radius, GeoUnit unit, string storeKey, string storeDistKey, GeoRadiusOptions options=null)
 
void GeoRadiusByMember (ArraySink sink, string key, string member, string radius, GeoUnit unit, GeoFlags flags, GeoRadiusOptions options=null)
 
void GeoRadiusByMember (IntegerSink sink, string key, string member, string radius, GeoUnit unit, string storeKey, string storeDistKey, GeoRadiusOptions options=null)
 
void Hdel (IntegerSink sink, string key, params string[] fields)
 
void Hexists (IntegerSink sink, string key, string field)
 
void Hget (BulkStringSink sink, string key, string field)
 
void HgetAll (ArraySink sink, string key)
 
void HincrBy (IntegerSink sink, string key, string field, long increment)
 
void HincrByFloat (BulkStringSink sink, string key, string field, float increment)
 
void Hkeys (ArraySink sink, string key)
 
void Hlen (IntegerSink sink, string key)
 
void HmGet (ArraySink sink, string key, params string[] fields)
 
void HmSet (SimpleStringSink sink, string key, params FieldValuePair[] pairs)
 
void Hscan (ArraySink sink, string key, ulong cursor, ScanOptions options)
 
void Hscan (ArraySink sink, string key, ulong cursor)
 
void Hset (IntegerSink sink, string key, string field, string value)
 
void HsetNx (IntegerSink sink, string key, string field, string value)
 
void HstrLen (IntegerSink sink, string key, string field)
 
void Hvals (ArraySink sink, string key)
 
void Pfadd (IntegerSink sink, string key, params string[] elements)
 
void Pfcount (IntegerSink sink, params string[] keys)
 
void Pfmerge (SimpleStringSink sink, string destkey, params string[] sourcekey)
 
void Del (IntegerSink sink, params string[] keys)
 
void Dump (BulkStringSink sink, string key)
 
void Exists (IntegerSink sink, params string[] keys)
 
void Expire (IntegerSink sink, string key, int seconds)
 
void ExpireAt (IntegerSink sink, string key, int timestamp)
 
void Keys (ArraySink sink, string pattern)
 
void Migrate (SimpleStringSink sink, string host, int port, string key, int destDb, int timeout)
 
void Migrate (SimpleStringSink sink, string host, int port, int destDb, int timeout, bool copy, bool replace, params string[] keys)
 
void Move (IntegerSink sink, string key, int db)
 
void Persist (IntegerSink sink, string key)
 
void Pexpire (IntegerSink sink, string key, int milliseconds)
 
void PexpireAt (IntegerSink sink, string key, int timestamp)
 
void Pttl (IntegerSink sink, string key)
 
void RandomKey (BulkStringSink sink)
 
void Rename (SimpleStringSink sink, string key, string newkey)
 
void RenameNx (IntegerSink sink, string key, string newkey)
 
void Restore (SimpleStringSink sink, string key, int ttl, string serializedValue, RestoreOptions options)
 
void Scan (ArraySink sink, ulong cursor, ScanOptions options)
 
void Sort (ArraySink sink, string key, SortOptions options)
 
void Sort (IntegerSink sink, string key, SortOptions options, string storeKey)
 
void Touch (IntegerSink sink, params string[] keys)
 
void Ttl (IntegerSink sink, string key)
 
void Type (SimpleStringSink sink, string key)
 
void Unlink (IntegerSink sink, params string[] keys)
 
void Wait (IntegerSink sink, int numReplicas, int timeout)
 
void Blpop (ArraySink sink, int timeout, params string[] keys)
 
void Brpop (ArraySink sink, int timeout, params string[] keys)
 
void BrpopLpush (BulkStringSink sink, string source, string destination, int timeout)
 
void Lindex (BulkStringSink sink, string key, int index)
 
void Linsert (IntegerSink sink, string key, PivotType pivotType, string pivot, string value)
 
void Llen (IntegerSink sink, string key)
 
void Lpop (BulkStringSink sink, string key)
 
void Lpush (IntegerSink sink, string key, params string[] values)
 
void Lpushx (IntegerSink sink, string key, string value)
 
void Lrange (ArraySink sink, string key, int start, int stop)
 
void Lrem (IntegerSink sink, string key, int count, string value)
 
void Lset (SimpleStringSink sink, string key, int index, string value)
 
void Ltrim (SimpleStringSink sink, string key, int start, int stop)
 
void Rpop (BulkStringSink sink, string key)
 
void RpopLpush (BulkStringSink sink, string source, string destination)
 
void Rpush (IntegerSink sink, string key, params string[] values)
 
void Rpushx (IntegerSink sink, string key, string value)
 
void Publish (IntegerSink sink, string channel, string message)
 
void PubsubChannels (ArraySink sink, string pattern)
 
void PubsubChannels (ArraySink sink)
 
void PubsubNumSub (ArraySink sink, params string[] channels)
 
void PubsubNumPat (IntegerSink sink)
 
void Eval (ArraySink sink, string script, string[] keys, params string[] argv)
 
void EvalSha (ArraySink sink, string sha1, string[] keys, params string[] argv)
 
void ScriptDebug (SimpleStringSink sink, DebugState debugState)
 
void ScriptExists (ArraySink sink, params string[] digests)
 
void ScriptFlush (SimpleStringSink sink)
 
void ScriptKill (SimpleStringSink sink)
 
void ScriptLoad (BulkStringSink sink, string script)
 
void Bgrewriteaof (SimpleStringSink sink)
 
void Bgsave (SimpleStringSink sink)
 
void ClientGetname (BulkStringSink sink)
 
void ClientId (IntegerSink sink)
 
void ClientKill (SimpleStringSink sink, string ip, int port)
 
void ClientKill (IntegerSink sink, params ClientKillFilter[] filters)
 
void ClientList (BulkStringSink sink)
 
void ClientList (BulkStringSink sink, ClientListClassType type)
 
void ClientPause (SimpleStringSink sink, int timeout)
 
void ClientSetName (SimpleStringSink sink, string name)
 
void ClientUnblock (IntegerSink sink, long clientId, ClientUnblockOption option)
 
void ClientUnblock (IntegerSink sink, long clientId)
 
void Command (ArraySink sink)
 
void CommandCount (IntegerSink sink)
 
void CommandGetkeys (ArraySink sink, params string[] args)
 
void CommandInfo (ArraySink sink, params string[] commandNames)
 
void ConfigGet (ArraySink sink, string parameter)
 
void ConfigResetStat (SimpleStringSink sink)
 
void ConfigRewrite (SimpleStringSink sink)
 
void ConfigSet (SimpleStringSink sink, string parameter, string value)
 
void DbSize (IntegerSink sink)
 
void FlushAll (SimpleStringSink sink, bool async)
 
void FlushDb (SimpleStringSink sink, bool async)
 
void Info (BulkStringSink sink, string section=null)
 
void LastSave (IntegerSink sink)
 
void MemoryDoctor (BulkStringSink sink)
 
void MemoryHelp (ArraySink sink)
 
void MemoryMallocStats (BulkStringSink sink)
 
void MemoryPurge (SimpleStringSink sink)
 
void MemoryStats (ArraySink sink)
 
void MemoryUsage (IntegerSink sink, string key, int count)
 
void MemoryUsage (IntegerSink sink, string key)
 
void ReplicaOf (SimpleStringSink sink, string host, string port)
 
void Role (ArraySink sink)
 
void Save (SimpleStringSink sink)
 
void Shutdown (SimpleStringSink sink)
 
void Shutdown (SimpleStringSink sink, ShutdownOption option)
 
void SlaveOf (SimpleStringSink sink, string host, string port)
 
void SlowLogGet (ArraySink sink, int count)
 
void SlowLogGet (ArraySink sink)
 
void SlowLogLen (IntegerSink sink)
 
void SlowLogReset (SimpleStringSink sink)
 
void Time (ArraySink sink)
 
void Sadd (IntegerSink sink, string key, params string[] members)
 
void Scard (IntegerSink sink, string key)
 
void Sdiff (ArraySink sink, params string[] keys)
 
void SdiffStore (IntegerSink sink, string destination, params string[] keys)
 
void Sinter (ArraySink sink, params string[] keys)
 
void SinterStore (IntegerSink sink, string destination, params string[] keys)
 
void SisMember (IntegerSink sink, string key, string member)
 
void Smembers (ArraySink sink, string key)
 
void Smove (IntegerSink sink, string source, string destination, string member)
 
void Spop (BulkStringSink sink, string key)
 
void Spop (BulkStringSink sink, string key, int count)
 
void SrandMember (BulkStringSink sink, string key)
 
void SrandMember (BulkStringSink sink, string key, int count)
 
void Srem (IntegerSink sink, string key, params string[] members)
 
void Sscan (ArraySink sink, string key, ulong cursor, ScanOptions options)
 
void Sunion (ArraySink sink, params string[] keys)
 
void SunionStore (IntegerSink sink, string destination, params string[] keys)
 
void BzpopMax (ArraySink sink, int timeout, params string[] keys)
 
void BzpopMin (ArraySink sink, int timeout, params string[] keys)
 
void Zadd (IntegerSink sink, string key, ZaddOptions options, params ZaddScoreMemberPair[] pairs)
 
void ZaddWithIncr (BulkStringSink sink, string key, ZaddOptions options, ZaddScoreMemberPair pair)
 
void Zcard (IntegerSink sink, string key)
 
void Zcount (IntegerSink sink, string key, string min, string max)
 
void ZincrBy (BulkStringSink sink, string key, double increment, string member)
 
void ZinterStore (IntegerSink sink, string destination, ZstoreOptions options, params string[] keys)
 
void ZlexCount (IntegerSink sink, string key, string min, string max)
 
void ZpopMax (ArraySink sink, string key, int count=1)
 
void ZpopMin (ArraySink sink, string key, int count=1)
 
void Zrange (ArraySink sink, string key, int start, int stop, bool withScores=false)
 
void ZrangeByLex (ArraySink sink, string key, string min, string max, Limit limit=null)
 
void ZrangeByScore (ArraySink sink, string key, string min, string max, ZrangeByScoreOptions options)
 
void Zrank (ArraySink sink, string key, string member)
 
void Zrem (IntegerSink sink, string key, params string[] members)
 
void ZremRangeByLex (IntegerSink sink, string key, string min, string max)
 
void ZremRangeByRank (IntegerSink sink, string key, int start, int stop)
 
void ZremRangeByScore (IntegerSink sink, string key, string min, string max)
 
void ZrevRange (ArraySink sink, string key, int start, int stop, bool withScores)
 
void ZrevRangeByLex (ArraySink sink, string key, string min, string max, Limit limit=null)
 
void ZrevRangeByScore (ArraySink sink, string key, string min, string max, ZrangeByScoreOptions options)
 
void ZrevRank (ArraySink sink, string key, string member)
 
void Zscan (ArraySink sink, string key, ulong cursor, ScanOptions options)
 
void Zscore (BulkStringSink sink, string key, string member)
 
void ZunionStore (IntegerSink sink, string destination, ZstoreOptions options, params string[] keys)
 
void Xack (IntegerSink sink, string key, string group, params string[] ids)
 
void Xadd (BulkStringSink sink, string key, string id, params FieldValuePair[] pairs)
 
void Xclaim (ArraySink sink, string key, string group, string consumer, int minIdleTime, XclaimOptions options, params string[] ids)
 
void Xdel (IntegerSink sink, string key, params string[] ids)
 
void XgroupCreate (SimpleStringSink sink, string key, string groupname, XgroupCreateOptions options)
 
void XgroupSetid (SimpleStringSink sink, string key, string groupname, string id=null)
 
void XgroupDestroy (IntegerSink sink, string key, string groupname)
 
void XgroupDelConsumer (IntegerSink sink, string key, string groupname, string consumername)
 
void XgroupHelp (ArraySink sink)
 
void XinfoConsumers (ArraySink sink, string key, string groupname)
 
void XinfoGroups (ArraySink sink, string key)
 
void XinfoStream (ArraySink sink, string key)
 
void XinfoHelp (ArraySink sink)
 
void Xlen (IntegerSink sink, string key)
 
void Xpending (ArraySink sink, string key, string group, XpendingOptions options=null)
 
void Xrange (ArraySink sink, string key, string start, string end, int count)
 
void Xrange (ArraySink sink, string key, string start, string end)
 
void Xread (ArraySink sink, XReadOptions options, params XReadKeyIdPair[] pairs)
 
void XreadGroup (ArraySink sink, string group, string consumer, XReadGroupOptions options, params XReadKeyIdPair[] pairs)
 
void XrevRange (ArraySink sink, string key, string start, string end, int count)
 
void XrevRange (ArraySink sink, string key, string start, string end)
 
void Xtrim (IntegerSink sink, string key, int count, bool approximateCount=false)
 
void Append (IntegerSink sink, string key, string value)
 
void BitCount (IntegerSink sink, string key, int start, int end)
 
void BitCount (IntegerSink sink, string key)
 
void BitField (ArraySink sink, string key, params BitfieldSubcommand[] subcommands)
 
void BitOp (IntegerSink sink, BitwiseOperation operation, string destkey, params string[] keys)
 
void BitPos (IntegerSink sink, string key, int bit, int start, int end=-1)
 
void BitPos (IntegerSink sink, string key, int bit)
 
void Decr (IntegerSink sink, string key)
 
void DecrBy (IntegerSink sink, string key, long decrement)
 
void Get (BulkStringSink sink, string key)
 
void GetBit (IntegerSink sink, string key, int offset)
 
void GetRange (BulkStringSink sink, string key, int start, int end)
 
void GetSet (BulkStringSink sink, string key, string value)
 
void Incr (IntegerSink sink, string key)
 
void IncrBy (IntegerSink sink, string key, long increment)
 
void IncrByFloat (BulkStringSink sink, string key, string increment)
 
void Mget (ArraySink sink, params string[] keys)
 
void Mset (SimpleStringSink sink, params KeyValuePair[] pairs)
 
void MsetNx (IntegerSink sink, params KeyValuePair[] pairs)
 
void PsetEx (SimpleStringSink sink, string key, long milliseconds, string value)
 
void Set (SimpleStringSink sink, string key, string value, SetOptions options)
 
void Set (SimpleStringSink sink, string key, string value)
 
void SetBit (IntegerSink sink, string key, int offset, string value)
 
void SetEx (SimpleStringSink sink, string key, long seconds, string value)
 
void SetNx (IntegerSink sink, string key, string value)
 
void SetRange (IntegerSink sink, string key, int offset, string value)
 
void StrLen (IntegerSink sink, string key)
 
void Discard (SimpleStringSink sink)
 
void Exec (ArraySink sink)
 
void Multi (SimpleStringSink sink)
 
void Unwatch (SimpleStringSink sink)
 
void Watch (SimpleStringSink sink, params string[] keys)
 
- Public Member Functions inherited from RedisClientBase
delegate void ConnectionCallback (RedisClientBase client, string error)
 
delegate void ConnectedEventHandler (RedisClientBase client)
 
delegate void DisconnectedEventHandler (RedisClientBase client)
 
 RedisClientBase (string hostname, int port)
 
void Connect (ConnectionCallback connectCallback=null)
 
void Disconnect (ConnectionCallback disconnectCallback=null)
 
bool Connected ()
 

Static Public Member Functions

static string QuoteWrap (string s)
 

Protected Member Functions

override void OnConnect (IAsyncResult connectResult)
 
- Protected Member Functions inherited from RedisClientBase
virtual void OnDisconnect (IAsyncResult disconnectResult)
 

Additional Inherited Members

- Protected Attributes inherited from RedisClientBase
string hostname
 
int port
 
Socket socket
 
- Events inherited from RedisClientBase
ConnectedEventHandler connected
 
DisconnectedEventHandler disconnected
 

Detailed Description

Redis has two modes of operation: a "command" mode, and a "pub/sub" mode. CommandClient implements the former, meaning users issue Redis commands and receive responses via callbacks. The methods of this class directly correspond to the Redis commands defined here.

Constructor & Destructor Documentation

CommandClient ( string  hostname,
int  port,
int  recvBufferLen,
int  sendBufferLen 
)
inline

CommandClient constructor.

Parameters
hostnameThe hostname or IP to connect to.
portThe port to connect to. Redis servers listen on 6379 by default.
recvBufferLenCommandClient allocates a receive buffer internally; this parameter allows users to tailor the buffer size to fit their needs.
sendBufferLenCommandClient allocates a send buffer internally; this parameter allows users to tailor the buffer size to fit their needs.

Member Function Documentation

void Append ( IntegerSink  sink,
string  key,
string  value 
)
inline

Implements the APPEND command. If key already exists and is a string, this command appends the value at the end of the string. If key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case.

Parameters
sinkThe user-provided callback object.
keyThe key to which 'value' is appended.
valueThe value appended to the string at 'key'
void Auth ( SimpleStringSink  sink,
string  password 
)
inline

Implements the AUTH command.

Parameters
sinkThe user-provided callback object.
passwordAuthorization password.

void Bgrewriteaof ( SimpleStringSink  sink)
inline

Implements the BGREWRITEAOF command.

Parameters
sinkThe user-provided callback object.
void Bgsave ( SimpleStringSink  sink)
inline

Implements the BGSAVE command.

Parameters
sinkThe user-provided callback object.
void BitCount ( IntegerSink  sink,
string  key,
int  start,
int  end 
)
inline

Implements the BITCOUNT command. Count the number of set bits (population counting) in a string.

Parameters
sinkThe user-provided callback object.
keyKey name identifying the string whose bits are counted.
startStarting byte index.
endEnding byte index.
void BitCount ( IntegerSink  sink,
string  key 
)
inline

Implements the BITCOUNT command. Count the number of set bits (population counting) in a string.

Parameters
sinkThe user-provided callback object.
keyKey name of the string whose bits are counted.
void BitField ( ArraySink  sink,
string  key,
params BitfieldSubcommand[]  subcommands 
)
inline

Implements the BITFIELD command. The command treats a Redis string as a array of bits, and is capable of addressing specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset.

Parameters
sinkThe user-provided callback object.
keyKey name of the bitfield that is operated upon.
subcommandsOne or more operations to perform on the bitfield.
void BitOp ( IntegerSink  sink,
BitwiseOperation  operation,
string  destkey,
params string[]  keys 
)
inline

Implements the BITOP command. Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

Parameters
sinkThe user-provided callback object.
operationThe operation (AND/OR/XOR/NOT) to perform on the key(s)
destkeyKey name where the result is stored.
keysThe input key(s).
void BitPos ( IntegerSink  sink,
string  key,
int  bit,
int  start,
int  end = -1 
)
inline

Implements the BITPOS command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is scanned.
bitSpecifies the bit value to look for.
startThe byte offset to start scanning from.
endThe byte offset (inclusive) where scanning stops.
void BitPos ( IntegerSink  sink,
string  key,
int  bit 
)
inline

Implements the BITPOS command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is scanned.
bitSpecifies the bit value to look for.
void Blpop ( ArraySink  sink,
int  timeout,
params string[]  keys 
)
inline

Implements the BLPOP command.

Parameters
sinkThe user-provided callback object.
timeoutSpecifies the maximum amount of time to block, in seconds. A value of 0 causes the operation to block indefinitely.
keysKey name of one or more lists to pop from.
void Brpop ( ArraySink  sink,
int  timeout,
params string[]  keys 
)
inline

Implements the BRPOP command.

Parameters
sinkThe user-provided callback object.
timeoutSpecifies the maximum amount of time to block, in seconds. A value of 0 causes the operation to block indefinitely.
keysKey name of one or more lists to pop from.
void BrpopLpush ( BulkStringSink  sink,
string  source,
string  destination,
int  timeout 
)
inline

Implements the BRPOPLPUSH command.

Parameters
sinkThe user-provided callback object.
sourceKey name of the list from which an element is popped.
destinationKey name of the list to which an element is pushed.
timeoutSpecifies the maximum amount of time to block, in seconds. A value of 0 causes the operation to block indefinitely.
void BzpopMax ( ArraySink  sink,
int  timeout,
params string[]  keys 
)
inline

Implements the BZPOPMAX command.

Parameters
sinkThe user-provided callback object.
timeoutSpecifies the maximum amount of time to block, in seconds. A value of 0 causes the operation to block indefinitely.
keysKey name(s) of the sorted sets from which the highest scored member is returned.
void BzpopMin ( ArraySink  sink,
int  timeout,
params string[]  keys 
)
inline

Implements the BZPOPMIN command.

Parameters
sinkThe user-provided callback object.
timeoutSpecifies the maximum amount of time to block, in seconds. A value of 0 causes the operation to block indefinitely.
keysKey name(s) of the sorted sets from which the lowest scored member is returned.
void ClientGetname ( BulkStringSink  sink)
inline

Implements the CLIENT GETNAME command.

Parameters
sinkThe user-provided callback object.
void ClientId ( IntegerSink  sink)
inline

Implements the CLIENT ID command. Even Redis authors don't seem to know what RESP type is returned here. From Redis example:

redis> CLIENT ID ERR Unknown or disabled command 'CLIENT' redis>

It looks like a RESP Integer might be what we need based on the output of "CLIENT LIST".

Parameters
sinkThe user-provided callback object.
void ClientKill ( SimpleStringSink  sink,
string  ip,
int  port 
)
inline

Implements the CLIENT KILL command.

Only supported by Redis 2.8.11 and earlier.

Parameters
sinkThe user-provided callback object.
ipThe IP address of the client whose connection is closed.
portThe port bound to the client connection that is closed.
void ClientKill ( IntegerSink  sink,
params ClientKillFilter[]  filters 
)
inline

Implements the CLIENT KILL command. [ID client-id] [TYPE normal|master|slave|pubsub] [ADDR ip:port] [SKIPME yes/no]

Parameters
sinkThe user-provided callback object.
filtersThe filter(s) used to select clients to disconnect.
void ClientList ( BulkStringSink  sink)
inline

Implements the CLIENT LIST command.

Parameters
sinkThe user-provided callback object.
void ClientList ( BulkStringSink  sink,
ClientListClassType  type 
)
inline

Implements the CLIENT LIST command.

Parameters
sinkThe user-provided callback object.
typeA filter specifying the type of clients to list.
void ClientPause ( SimpleStringSink  sink,
int  timeout 
)
inline

Implements the CLIENT PAUSE command.

Parameters
sinkThe user-provided callback object.
timeoutThe amount of time to suspend client connections, in milliseconds.
void ClientSetName ( SimpleStringSink  sink,
string  name 
)
inline

Implements the CLIENT SETNAME command.

Parameters
sinkThe user-provided callback object.
nameThe name to assigns to the current connection.
void ClientUnblock ( IntegerSink  sink,
long  clientId,
ClientUnblockOption  option 
)
inline

Implements the CLIENT UNBLOCK command.

Parameters
sinkThe user-provided callback object.
clientIdThe ID of the client to unblock.
optionOption specifying how the client is unblocked (i.e. via timeout or error).
void ClientUnblock ( IntegerSink  sink,
long  clientId 
)
inline

Implements the CLIENT UNBLOCK command.

Parameters
sinkThe user-provided callback object.
clientIdThe ID of the client to unblock.
void Command ( ArraySink  sink)
inline

Implements the COMMAND command. Note: Array reply is nested.

Parameters
sinkThe user-provided callback object.
void CommandCount ( IntegerSink  sink)
inline

Implements the COMMAND COUNT command.

Parameters
sinkThe user-provided callback object.
void CommandGetkeys ( ArraySink  sink,
params string[]  args 
)
inline

Implements the COMMAND GETKEYS command.

Parameters
sinkThe user-provided callback object.
argsComponents of a Redis command (a command and its arguments) used to determine key positions for the given command.
void CommandInfo ( ArraySink  sink,
params string[]  commandNames 
)
inline

Implements the COMMAND INFO command.

Parameters
sinkThe user-provided callback object.
commandNamesThe list of command names whose info is returned.
void ConfigGet ( ArraySink  sink,
string  parameter 
)
inline

Implements the CONFIG GET command.

Parameters
sinkThe user-provided callback object.
parameterA pattern matching desired config parameters.
void ConfigResetStat ( SimpleStringSink  sink)
inline

Implements the CONFIG RESETSTAT command.

Parameters
sinkThe user-provided callback object.
void ConfigRewrite ( SimpleStringSink  sink)
inline

Implements the CONFIG REWRITE command.

Parameters
sinkThe user-provided callback object.
void ConfigSet ( SimpleStringSink  sink,
string  parameter,
string  value 
)
inline

Implements the CONFIG SET command.

Parameters
sinkThe user-provided callback object.
parameterThe config parameter to set.
valueThe new value of the config parameter.
void DbSize ( IntegerSink  sink)
inline

Implements the DBSIZE command.

Parameters
sinkThe user-provided callback object.
void Decr ( IntegerSink  sink,
string  key 
)
inline

Implements the DECR command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is decremented.
void DecrBy ( IntegerSink  sink,
string  key,
long  decrement 
)
inline

Implements the DECRBY command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is decremented.
decrementThe amount to decrement.
void Del ( IntegerSink  sink,
params string[]  keys 
)
inline

Implements the DEL command.

Parameters
sinkThe user-provided callback object.
keysThe key(s) to remove.
void Discard ( SimpleStringSink  sink)
inline

Implements the DISCARD command.

Parameters
sinkThe user-provided callback object.
void Dump ( BulkStringSink  sink,
string  key 
)
inline

Implements the DUMP command.

Parameters
sinkThe user-provided callback object.
keyKey name of the value to serialized.
void Echo ( BulkStringSink  sink,
string  message 
)
inline

Implements the ECHO command.

Parameters
sinkThe user-provided callback object.
messageThe message to return.
void Eval ( ArraySink  sink,
string  script,
string[]  keys,
params string[]  argv 
)
inline

Implements the EVAL command.

Parameters
sinkThe user-provided callback object.
scriptThe script that is evaluated. This script string is automatically wrapped in quotes as it is likely to contain spaces.
keysKey names passed as arguments to the script.
argvAdditional non-key arguments passed to the script.
void EvalSha ( ArraySink  sink,
string  sha1,
string[]  keys,
params string[]  argv 
)
inline

Implements the EVALSHA command.

Parameters
sinkThe user-provided callback object.
sha1The SHA1 digest of a script that has been cached via ScriptLoad().
keysKey names passed as arguments to the script.
argvAdditional non-key arguments passed to the script.
void Exec ( ArraySink  sink)
inline

Implements the EXEC command.

Parameters
sinkThe user-provided callback object.
void Exists ( IntegerSink  sink,
params string[]  keys 
)
inline

Implements the EXISTS command.

Parameters
sinkThe user-provided callback object.
keysKey name(s) to check.
void Expire ( IntegerSink  sink,
string  key,
int  seconds 
)
inline

Implements the EXPIRE command.

Parameters
sinkThe user-provided callback object.
keyKey name to expire.
secondsTimeout value, in seconds.
void ExpireAt ( IntegerSink  sink,
string  key,
int  timestamp 
)
inline

Implements the EXPIREAT command.

Parameters
sinkThe user-provided callback object.
keyKey name to expire.
timestampAn absolute timeout value, given as a Unix timestamp, in seconds.
void FlushAll ( SimpleStringSink  sink,
bool  async 
)
inline

Implements the FLUSHALL command.

Parameters
sinkThe user-provided callback object.
asyncFlag indicating if the operation should be performed in the background without blocking the server.
void FlushDb ( SimpleStringSink  sink,
bool  async 
)
inline

Implements the FLUSHDB command.

Parameters
sinkThe user-provided callback object.
asyncFlag indicating if the operation should be performed in the background without blocking the server.
void GeoAdd ( IntegerSink  sink,
string  key,
params GeoCoord[]  geoCoords 
)
inline

Implements the GEOADD command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set where the given geospatial items are stored.
geoCoordsThe geospatial items to add.
void GeoAdd ( IntegerSink  sink,
string  key,
string  longitude,
string  latitude,
string  member 
)
inline

Implements the GEOADD command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set where the given geospatial item is stored.
longitudeLongitude of the geospatial item to add.
latitudeLatitude of the geospatial item to add.
memberMember of the geospatial item to add.
void GeoDist ( BulkStringSink  sink,
string  key,
string  member1,
string  member2,
GeoUnit  unit 
)
inline

Implements the GEODIST command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set containing member1 and member2.
member1The first geospatial item to compare.
member2The second geospatial item to compare.
unitSpecifies the unit of distance between member1 and member2.
void GeoDist ( BulkStringSink  sink,
string  key,
string  member1,
string  member2 
)
inline

Implements the GEODIST command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set containing member1 and member2.
member1The first geospatial item to compare.
member2The second geospatial item to compare.
void GeoHash ( ArraySink  sink,
string  key,
params string[]  members 
)
inline

Implements the GEOHASH command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set containing the given members.
membersThe geospatial items whose hashes are returned.
void GeoPos ( ArraySink  sink,
string  key,
params string[]  members 
)
inline

Implements the GEOPOS command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set containing the given members.
membersThe geospatial items whose positions are returned.
void GeoRadius ( ArraySink  sink,
string  key,
string  longitude,
string  latitude,
string  radius,
GeoUnit  unit,
GeoFlags  flags,
GeoRadiusOptions  options = null 
)
inline

Implements the GEORADIUS command.

This version of GeoRadius() supports the WITH* flags (WITHCOORD, WITHDIST, WITHHASH). Note: using any WITH* flag(s) will cause the return value to be a nested RESP Array; the given ArraySink must be implemented to handle it accordingly.

Parameters
sinkThe user-provided callback object.
keyKey name of the set from which the items are returned.
longitudeLongitude of the center location.
latitudeLatitude of the center location.
radiusRadius from the center location.
unitSpecifies the unit of distance for radius.
flagsA combination of WITHCOORD, WITHDIST, and WITHHASH flags, ORed together.
optionsOptional parameters for specifying the number of elements to return, and the sort order.
void GeoRadius ( IntegerSink  sink,
string  key,
string  longitude,
string  latitude,
string  radius,
GeoUnit  unit,
string  storeKey,
string  storeDistKey,
GeoRadiusOptions  options = null 
)
inline

Implements the GEORADIUS command.

This version of GeoRadius() supports the STORE* options (STORE, STOREDIST). Note: nothing prevents the simultaneous use of STORE and STOREDIST, but only one of them will have an affect in this case (STOREDIST overrides STORE). This is an artifact of how the command is implemented on the server.

Parameters
sinkThe user-provided callback object.
keyKey name of the set from which the items are returned.
longitudeLongitude of the center location.
latitudeLatitude of the center location.
radiusRadius from the center location.
unitSpecifies the unit of distance for radius.
storeKeyKey name of the Sorted Set where the results of the STORE operation will be saved. The STORE option will be omitted if this is null.
storeDistKeyKey name of the Sorted Set where the results of the STOREDIST operation will be saved. The STOREDIST option will be omitted if this is null.
optionsOptional parameters for specifying the number of elements to return, and the sort order.
void GeoRadiusByMember ( ArraySink  sink,
string  key,
string  member,
string  radius,
GeoUnit  unit,
GeoFlags  flags,
GeoRadiusOptions  options = null 
)
inline

Implements the GEORADIUSBYMEMBER command.

This version of GeoRadiusByMember() supports the WITH* flags (WITHCOORD, WITHDIST, WITHHASH). Note: using any WITH* flag(s) will cause the return value to be a nested RESP Array; the given ArraySink must be implemented to handle it accordingly.

Parameters
sinkThe user-provided callback object.
keyKey name of the set from which the items are returned.
memberThe member whose location is used as the center for the query.
radiusRadius from the center location.
unitSpecifies the unit of distance for radius.
flagsA combination of WITHCOORD, WITHDIST, and WITHHASH flags, ORed together.
optionsOptional parameters for specifying the number of elements to return, and the sort order.
void GeoRadiusByMember ( IntegerSink  sink,
string  key,
string  member,
string  radius,
GeoUnit  unit,
string  storeKey,
string  storeDistKey,
GeoRadiusOptions  options = null 
)
inline

Implements the GEORADIUSBYMEMBER command.

This version of GeoRadiusByMember() supports the STORE* options (STORE, STOREDIST). Note: nothing prevents the simultaneous use of STORE and STOREDIST, but only one of them will have an affect in this case (STOREDIST overrides STORE). This is an artifact of how the command is implemented on the server.

Parameters
sinkThe user-provided callback object.
keyKey name of the set from which the items are returned.
memberThe member whose location is used as the center for the query.
radiusRadius from the center location.
unitSpecifies the unit of distance for radius.
storeKeyKey name of the Sorted Set where the results of the STORE operation will be saved. The STORE option will be omitted if this is null.
storeDistKeyKey name of the Sorted Set where the results of the STOREDIST operation will be saved. The STOREDIST option will be omitted if this is null.
optionsOptional parameters for specifying the number of elements to return, and the sort order.
void Get ( BulkStringSink  sink,
string  key 
)
inline

Implements the GET command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is retrieved.
void GetBit ( IntegerSink  sink,
string  key,
int  offset 
)
inline

Implements the GETBIT command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key from which the bit is retrieved.
offsetThe bit offset to retrieve.
void GetRange ( BulkStringSink  sink,
string  key,
int  start,
int  end 
)
inline

Implements the GETRANGE command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key from which the byte range is read.
startThe start offset.
endThe end offset.
void GetSet ( BulkStringSink  sink,
string  key,
string  value 
)
inline

Implements the GETSET command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key whose value is retrieved and set.
valueThe new value that key will be set to.
void Hdel ( IntegerSink  sink,
string  key,
params string[]  fields 
)
inline

Implements the HDEL command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
fieldsFields to delete.
void Hexists ( IntegerSink  sink,
string  key,
string  field 
)
inline

Implements the HEXISTS command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
fieldField name to check.
void Hget ( BulkStringSink  sink,
string  key,
string  field 
)
inline

Implements the HGET command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
fieldName of the field to return.
void HgetAll ( ArraySink  sink,
string  key 
)
inline

Implements the HGETALL command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
void HincrBy ( IntegerSink  sink,
string  key,
string  field,
long  increment 
)
inline

Implements the HINCRBY command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
fieldName of the field to increment.
incrementThe integer value added to field.
void HincrByFloat ( BulkStringSink  sink,
string  key,
string  field,
float  increment 
)
inline

Implements the HINCRBYFLOAT command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
fieldName of the field to increment.
incrementThe float value added to field.
void Hkeys ( ArraySink  sink,
string  key 
)
inline

Implements the HKEYS command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
void Hlen ( IntegerSink  sink,
string  key 
)
inline

HLEN key.

<summary Implements the HLEN command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
void HmGet ( ArraySink  sink,
string  key,
params string[]  fields 
)
inline

Implements the HMGET command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
fieldsThe fields to return.
void HmSet ( SimpleStringSink  sink,
string  key,
params FieldValuePair[]  pairs 
)
inline

Implements the HMSET command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
pairsThe field/value pairs to set.
void Hscan ( ArraySink  sink,
string  key,
ulong  cursor,
ScanOptions  options 
)
inline

Implements the HSCAN command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
cursorThe cursor returned by the previous call to Hscan() (or 0 to start a new iteration).
optionsAdditional options for the HSCAN command (e.g. MATCH, COUNT).
void Hscan ( ArraySink  sink,
string  key,
ulong  cursor 
)
inline

Implements the HSCAN command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
cursorThe cursor returned by the previous call to Hscan() (or 0 to start a new iteration).
void Hset ( IntegerSink  sink,
string  key,
string  field,
string  value 
)
inline

Implements the HSET command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
fieldThe field name to set.
valueThe value to set for field.
void HsetNx ( IntegerSink  sink,
string  key,
string  field,
string  value 
)
inline

Implements the HSETNX command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
fieldThe field name to set.
valueThe value to set if field does not already exist.
void HstrLen ( IntegerSink  sink,
string  key,
string  field 
)
inline

Implements the HSTRLEN command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
fieldName of the field whose length is returned.
void Hvals ( ArraySink  sink,
string  key 
)
inline

Implements the HVALS command.

Parameters
sinkThe user-provided callback object.
keyKey name of the hash.
void Incr ( IntegerSink  sink,
string  key 
)
inline

Implements the INCR command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is incremented.
void IncrBy ( IntegerSink  sink,
string  key,
long  increment 
)
inline

Implements the INCRBY command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is incremented.
incrementThe amount to increment.
void IncrByFloat ( BulkStringSink  sink,
string  key,
string  increment 
)
inline

Implements the INCRBYFLOAT command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is incremented.
incrementThe amount to increment. This is a string because Redis supports alternative ways to specify the float value (e.g. "2.0e2")
void Info ( BulkStringSink  sink,
string  section = null 
)
inline

Implements the INFO command.

Parameters
sinkThe user-provided callback object.
sectionSpecifies the section about which information is returned.
void Keys ( ArraySink  sink,
string  pattern 
)
inline

Implements the KEYS command.

Parameters
sinkThe user-provided callback object.
patternThe pattern used to match key names.
void LastSave ( IntegerSink  sink)
inline

Implements the LASTSAVE command.

Parameters
sinkThe user-provided callback object.
void Lindex ( BulkStringSink  sink,
string  key,
int  index 
)
inline

Implements the LINDEX command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list from which a value is returned.
indexZero-based index of the item to return.
void Linsert ( IntegerSink  sink,
string  key,
PivotType  pivotType,
string  pivot,
string  value 
)
inline

Implements the LINSERT command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list into which value is inserted.
pivotTypeIndicates whether to insert value BEFORE, or AFTER pivot.
pivotThe reference value used to figure out the insertion position.
valueThe value to insert.
void Llen ( IntegerSink  sink,
string  key 
)
inline

Implements the LLEN command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list whose length is returned.
void Lpop ( BulkStringSink  sink,
string  key 
)
inline

Implements the LPOP command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list from which a value is popped.
void Lpush ( IntegerSink  sink,
string  key,
params string[]  values 
)
inline

Implements the LPUSH command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list to which values are pushed.
valuesThe value(s) to push.
void Lpushx ( IntegerSink  sink,
string  key,
string  value 
)
inline

Implements the LPUSHX command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list to which value is pushed if it does not already exist.
valueThe value to push.
void Lrange ( ArraySink  sink,
string  key,
int  start,
int  stop 
)
inline

Implements the LRANGE command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list from which values are returned.
startZero-based index of the first element in the range to return.
stopZero-based index of the last element in the range to return.
void Lrem ( IntegerSink  sink,
string  key,
int  count,
string  value 
)
inline

Implements the LREM command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list from which elements are removed.
countIndicates not only the number of elements to remove, but where to remove them from (e.g. the head of the list, or the tail). When count is 0, all elements matching value are removed, irrespective of their position.
valueThe value to remove.
void Lset ( SimpleStringSink  sink,
string  key,
int  index,
string  value 
)
inline

Implements the LSET command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list in which value is set.
indexZero-based index of the item to set.
valueThe value to set.
void Ltrim ( SimpleStringSink  sink,
string  key,
int  start,
int  stop 
)
inline

Implements the LTRIM command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list that is trimmed.
startZero-based index of the first element in the range to preserve.
stopZero-based index of the last element in the range to preserve.
void MemoryDoctor ( BulkStringSink  sink)
inline

Implements the MEMORY DOCTOR command.

Parameters
sinkThe user-provided callback object.
void MemoryHelp ( ArraySink  sink)
inline

Implements the MEMORY HELP command.

Parameters
sinkThe user-provided callback object.
void MemoryMallocStats ( BulkStringSink  sink)
inline

Implements the MEMORY MALLOC-STATS command.

Parameters
sinkThe user-provided callback object.
void MemoryPurge ( SimpleStringSink  sink)
inline

Implements the MEMORY PURGE command.

Parameters
sinkThe user-provided callback object.
void MemoryStats ( ArraySink  sink)
inline

Implements the MEMORY STATS command.

Parameters
sinkThe user-provided callback object.
void MemoryUsage ( IntegerSink  sink,
string  key,
int  count 
)
inline

Implements the MEMORY USAGE command.

Parameters
sinkThe user-provided callback object.
keyKey name whose memory usage is reported.
countThe number of nested values to sample. A value of 0 results in all nested values being sampled.
void MemoryUsage ( IntegerSink  sink,
string  key 
)
inline

Implements the MEMORY USAGE command.

Parameters
sinkThe user-provided callback object.
keyKey name whose memory usage is reported.
void Mget ( ArraySink  sink,
params string[]  keys 
)
inline

Implements the MGET command.

Parameters
sinkThe user-provided callback object.
keysThe list of key names whose values are returned.
void Migrate ( SimpleStringSink  sink,
string  host,
int  port,
string  key,
int  destDb,
int  timeout 
)
inline

Implements the MIGRATE command.

Parameters
sinkThe user-provided callback object.
hostHostname of the destination Redis server.
portPort number of the destination Redis server.
keyThe key to migrate.
destDbIndex of the logical database on the destination server.
timeoutMaximum idle time for the communication, in milliseconds.
void Migrate ( SimpleStringSink  sink,
string  host,
int  port,
int  destDb,
int  timeout,
bool  copy,
bool  replace,
params string[]  keys 
)
inline

Implements the MIGRATE command.

Parameters
sinkThe user-provided callback object.
hostHostname of the destination Redis server.
portPort number of the destination Redis server.
destDbIndex of the logical database on the destination server.
timeoutMaximum idle time for the communication, in milliseconds.
copyFlag indicating whether or not to remove the key from the local instance.
replaceFlag indicating whether or not to replace the key on the remote instance.
keysThe key(s) to migrate.
void Move ( IntegerSink  sink,
string  key,
int  db 
)
inline

Implements the MOVE command.

Parameters
sinkThe user-provided callback object.
keyThe key to move.
dbIndex of the destination database.
void Mset ( SimpleStringSink  sink,
params KeyValuePair[]  pairs 
)
inline

Implements the MSET command.

Parameters
sinkThe user-provided callback object.
pairsThe list of key/value pairs to set.
void MsetNx ( IntegerSink  sink,
params KeyValuePair[]  pairs 
)
inline

Implements the MSETNX command.

Parameters
sinkThe user-provided callback object.
pairsThe list of key/value pairs to set.
void Multi ( SimpleStringSink  sink)
inline

Implements the MULTI command.

Parameters
sinkThe user-provided callback object.
override void OnConnect ( IAsyncResult  connectResult)
inlineprotectedvirtual

Callback used in calls to Socket.BeginConnect().

Reimplemented from RedisClientBase.

void Persist ( IntegerSink  sink,
string  key 
)
inline

Implements the PERSIST command.

Parameters
sinkThe user-provided callback object.
keyKey name to persist.
void Pexpire ( IntegerSink  sink,
string  key,
int  milliseconds 
)
inline

Implements the PEXPIRE command.

Parameters
sinkThe user-provided callback object.
keyKey name to expire.
millisecondsTimeout value, in milliseconds.
void PexpireAt ( IntegerSink  sink,
string  key,
int  timestamp 
)
inline

Implements the PEXPIREAT command.

Parameters
sinkThe user-provided callback object.
keyKey name to expire.
timestampAn absolute timeout value, given as a Unix timestamp, in milliseconds.
void Pfadd ( IntegerSink  sink,
string  key,
params string[]  elements 
)
inline

Implements the PFADD command.

Parameters
sinkThe user-provided callback object.
keyKey name of the affected HyperLogLog data structure.
elementsThe element(s) to add.
void Pfcount ( IntegerSink  sink,
params string[]  keys 
)
inline

Implements the PFCOUNT command.

Parameters
sinkThe user-provided callback object.
keysKey names to use in cardinality calculation.
void Pfmerge ( SimpleStringSink  sink,
string  destkey,
params string[]  sourcekey 
)
inline

Implements the PFMERGE command.

Parameters
sinkThe user-provided callback object.
destkeyKey name of the destination HyperLogLog data structure.
sourcekeyKey name(s) of the sources that are merged into destkey.
void Ping ( BulkStringSink  sink,
string  message 
)
inline

Implements the PING command.

Parameters
sinkThe user-provided callback object.
messageThe message to return.
void Ping ( SimpleStringSink  sink)
inline

Implements the PING command.

Parameters
sinkThe user-provided callback object.
void PsetEx ( SimpleStringSink  sink,
string  key,
long  milliseconds,
string  value 
)
inline

Implements the PSETEX command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is set.
millisecondsThe timeout value in milliseconds.
valueThe value that key is set to.
void Pttl ( IntegerSink  sink,
string  key 
)
inline

Implements the PTTL command.

Parameters
sinkThe user-provided callback object.
keyThe key whose TTL (in milliseconds) is returned.
void Publish ( IntegerSink  sink,
string  channel,
string  message 
)
inline

Implements the PUBLISH command.

Parameters
sinkThe user-provided callback object.
channelThe name of the channel that message is published to.
messageThe message to publish.
void PubsubChannels ( ArraySink  sink,
string  pattern 
)
inline

Implements the PUBSUB CHANNELS command.

Parameters
patternThe pattern used to match channel names.
void PubsubChannels ( ArraySink  sink)
inline

Implements the PUBSUB CHANNELS command.

void PubsubNumPat ( IntegerSink  sink)
inline

Implements the PUBSUB NUMPAT command.

void PubsubNumSub ( ArraySink  sink,
params string[]  channels 
)
inline

Implements the PUBSUB NUMSUB command.

Parameters
channelsSpecifies the channels to include in the count.
void Quit ( SimpleStringSink  sink)
inline

Implements the QUIT command.

Parameters
sinkThe user-provided callback object.
static string QuoteWrap ( string  s)
inlinestatic

Utility method to wrap quotes around string values that contain spaces.

Parameters
sThe string value to wrap.
Returns
The given string wrapped in quotation marks.
void RandomKey ( BulkStringSink  sink)
inline

Implements the RANDOMKEY command.

Parameters
sinkThe user-provided callback object.
void Rename ( SimpleStringSink  sink,
string  key,
string  newkey 
)
inline

Implements the RENAME command.

Parameters
sinkThe user-provided callback object.
keyOld key name.
newkeyNew key name.
void RenameNx ( IntegerSink  sink,
string  key,
string  newkey 
)
inline

Implements the RENAMENX command.

Parameters
sinkThe user-provided callback object.
keyOld key name.
newkeyNew key name.
void ReplicaOf ( SimpleStringSink  sink,
string  host,
string  port 
)
inline

Implements the REPLICAOF command.

A special value of "NO" for host, and "ONE" for port will turn off replication

Parameters
sinkThe user-provided callback object.
hostThe hostname of a Redis server to replicate.
portThe Redis port on host (specified as a string to accommodate the "REPLICAOF NO ONE" command format).
void Restore ( SimpleStringSink  sink,
string  key,
int  ttl,
string  serializedValue,
RestoreOptions  options 
)
inline

Implements the RESTORE command.

Parameters
sinkThe user-provided callback object.
keyKey name for the restored value.
ttlTTL for the new key, in milliseconds. No expiration is set if this value is 0.
serializedValueThe serialized value, as produced by Dump().
optionsAdditional options for the RESTORE command (e.g. REPLACE, ABSTTL, IDLETIME, and FREQ).
void Role ( ArraySink  sink)
inline

Implements the ROLE command.

Parameters
sinkThe user-provided callback object.
void Rpop ( BulkStringSink  sink,
string  key 
)
inline

Implements the RPOP command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list from which a value is popped.
void RpopLpush ( BulkStringSink  sink,
string  source,
string  destination 
)
inline

Implements the RPOPLPUSH command.

Parameters
sinkThe user-provided callback object.
sourceKey name of the list from which an element is popped.
destinationKey name of the list to which an element is pushed.
void Rpush ( IntegerSink  sink,
string  key,
params string[]  values 
)
inline

Implements the RPUSH command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list to which values are pushed.
valuesThe value(s) to push.
void Rpushx ( IntegerSink  sink,
string  key,
string  value 
)
inline

Implements the RPUSHX command.

Parameters
sinkThe user-provided callback object.
keyKey name of the list to which value is pushed if it does not already exist.
valueThe value to push.
void Sadd ( IntegerSink  sink,
string  key,
params string[]  members 
)
inline

Implements the SADD command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set to which members are added.
membersThe elements to add.
void Save ( SimpleStringSink  sink)
inline

Implements the SAVE command.

Parameters
sinkThe user-provided callback object.
void Scan ( ArraySink  sink,
ulong  cursor,
ScanOptions  options 
)
inline

Implements the SCAN command.

Parameters
sinkThe user-provided callback object.
cursorThe cursor returned by the previous call to Scan() (or 0 to start a new iteration).
optionsAdditional options for the SCAN command (e.g. MATCH, COUNT).
void Scard ( IntegerSink  sink,
string  key 
)
inline

Implements the SCARD command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set whose cardinality is returned.
void ScriptDebug ( SimpleStringSink  sink,
DebugState  debugState 
)
inline

Implements the SCRIPT DEBUG command.

Parameters
sinkThe user-provided callback object.
debugStateThe debug mode to set (i.e. YES, SYNC, NO)
void ScriptExists ( ArraySink  sink,
params string[]  digests 
)
inline

Implements the SCRIPT EXISTS command.

Parameters
sinkThe user-provided callback object.
digestsThe SHA1 digests whose script cache presences are returned.
void ScriptFlush ( SimpleStringSink  sink)
inline

Implements the SCRIPT FLUSH command.

Parameters
sinkThe user-provided callback object.
void ScriptKill ( SimpleStringSink  sink)
inline

Implements the SCRIPT KILL command.

Parameters
sinkThe user-provided callback object.
void ScriptLoad ( BulkStringSink  sink,
string  script 
)
inline

Implements the SCRIPT LOAD command.

Parameters
sinkThe user-provided callback object.
scriptThe script that is loaded into the script cache. This script string is automatically wrapped in quotes as it is likely to contain spaces.
void Sdiff ( ArraySink  sink,
params string[]  keys 
)
inline

Implements the SDIFF command.

Parameters
sinkThe user-provided callback object.
keysKey names of the sets whose differences are returned.
void SdiffStore ( IntegerSink  sink,
string  destination,
params string[]  keys 
)
inline

Implements the SDIFFSTORE command.

Parameters
sinkThe user-provided callback object.
destinationKey name of the set used to store the result.
keysKey names of the sets whose differences are stored in destination.
void Select ( SimpleStringSink  sink,
int  index 
)
inline

Implements the SELECT command.

Parameters
sinkThe user-provided callback object.
indexThe zero-based index of the Redis logical database to select.
void Set ( SimpleStringSink  sink,
string  key,
string  value,
SetOptions  options 
)
inline

Implements the SET command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is set.
valueThe value that key is set to.
optionsAdditional options for the SET command allowing the caller to specify expiration values and extant key behavior.
void Set ( SimpleStringSink  sink,
string  key,
string  value 
)
inline

Implements the SET command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is set.
valueThe value that key is set to.
void SetBit ( IntegerSink  sink,
string  key,
int  offset,
string  value 
)
inline

Implements the SETBIT command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key containing the bit to set.
offsetThe offset of the bit to set.
valueThe value the bit will be set to.
void SetEx ( SimpleStringSink  sink,
string  key,
long  seconds,
string  value 
)
inline

Implements the SETEX command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is set.
secondsThe timeout value in seconds.
valueThe value that key is set to.
void SetNx ( IntegerSink  sink,
string  key,
string  value 
)
inline

Implements the SETNX command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key to set.
valueThe value that key is set to if key doesn't already exist.
void SetRange ( IntegerSink  sink,
string  key,
int  offset,
string  value 
)
inline

Implements the SETRANGE command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key that is written to.
offsetThe byte offset at which value is written.
valueThe value that is written into key.
void Shutdown ( SimpleStringSink  sink)
inline

Implements the SHUTDOWN command. From the docs:

"On success nothing is returned since the server quits and the connection is closed."

Similar to CLIENT REPLY, nothing is returned, but in this case the socket should be closed and we won't be stuck waiting indefinitely for a response.

Parameters
sinkThe user-provided callback object.
void Shutdown ( SimpleStringSink  sink,
ShutdownOption  option 
)
inline

Implements the SHUTDOWN command.

Parameters
sinkThe user-provided callback object.
optionSpecifies DB saving behavior on shutdown.
void Sinter ( ArraySink  sink,
params string[]  keys 
)
inline

Implements the SINTER command.

Parameters
sinkThe user-provided callback object.
keysKey names of the sets that are intersected with each other.
void SinterStore ( IntegerSink  sink,
string  destination,
params string[]  keys 
)
inline

Implements the SINTERSTORE command.

Parameters
sinkThe user-provided callback object.
destinationKey name of the set used to store the result.
keysKey names of the sets that are intersected with each other.
void SisMember ( IntegerSink  sink,
string  key,
string  member 
)
inline

Implements the SISMEMBER command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set that is inspected.
memberThe name of the element whose presence is returned.
void SlaveOf ( SimpleStringSink  sink,
string  host,
string  port 
)
inline

Implements the SLAVEOF command.

A special value of "NO" for host, and "ONE" for port will turn off replication

Parameters
sinkThe user-provided callback object.
hostThe hostname of a Redis server to replicate.
portThe Redis port on host (specified as a string to accommodate the "SLAVEOF NO ONE" command format).
void SlowLogGet ( ArraySink  sink,
int  count 
)
inline

Implements the SLOWLOG command.

Parameters
sinkThe user-provided callback object.
countThe number of entries to return.
void SlowLogGet ( ArraySink  sink)
inline

Implements the SLOWLOG command.

Parameters
sinkThe user-provided callback object.
void SlowLogLen ( IntegerSink  sink)
inline

Implements the SLOWLOG command.

Parameters
sinkThe user-provided callback object.
void SlowLogReset ( SimpleStringSink  sink)
inline

Implements the SLOWLOG command.

Parameters
sinkThe user-provided callback object.
void Smembers ( ArraySink  sink,
string  key 
)
inline

Implements the SMEMBERS command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set whose elements are returned.
void Smove ( IntegerSink  sink,
string  source,
string  destination,
string  member 
)
inline

Implements the SMOVE command.

Parameters
sinkThe user-provided callback object.
sourceKey name of the set from which member is moved.
destinationKey name of the set to which member is moved.
memberThe name of the element to move.
void Sort ( ArraySink  sink,
string  key,
SortOptions  options 
)
inline

Implements the SORT command. Array reply: without passing the store option the command returns a list of sorted elements.

Parameters
sinkThe user-provided callback object.
keyKey name of the list, set or sorted set to sort.
optionsAdditional options for the SORT command (e.g. BY pattern, LIMIT, GET patterns, sort order, and ALPHA)
void Sort ( IntegerSink  sink,
string  key,
SortOptions  options,
string  storeKey 
)
inline

Implements the SORT command. Integer reply: when the store option is specified the command returns the number of sorted elements in the destination list.

Parameters
sinkThe user-provided callback object.
keyKey name of the list, set or sorted set to sort.
optionsAdditional options for the SORT command (e.g. BY pattern, LIMIT, GET patterns, sort order, and ALPHA)
storeKeyKey name used to store the resulting list.
void Spop ( BulkStringSink  sink,
string  key 
)
inline

Implements the SPOP command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set from which random elements are popped.
void Spop ( BulkStringSink  sink,
string  key,
int  count 
)
inline

Implements the SPOP command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set from which random elements are popped.
countThe numer of elements to return.
void SrandMember ( BulkStringSink  sink,
string  key 
)
inline

Implements the SRANDMEMBER command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set from which random elements are returned.
void SrandMember ( BulkStringSink  sink,
string  key,
int  count 
)
inline

Implements the SRANDMEMBER command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set from which random elements are returned.
countThe numer of elements to return.
void Srem ( IntegerSink  sink,
string  key,
params string[]  members 
)
inline

Implements the SREM command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set from which elements are removed.
membersThe names of the elements to remove.
void Sscan ( ArraySink  sink,
string  key,
ulong  cursor,
ScanOptions  options 
)
inline

Implements the SSCAN command.

Parameters
sinkThe user-provided callback object.
keyKey name of the set that is iterated.
cursorThe cursor returned by the previous call to Sscan() (or 0 to start a new iteration).
optionsAdditional options for the SSCAN command (e.g. MATCH, COUNT).
void StrLen ( IntegerSink  sink,
string  key 
)
inline

Implements the STRLEN command.

Parameters
sinkThe user-provided callback object.
keyThe name of the key whose length is returned.
void Sunion ( ArraySink  sink,
params string[]  keys 
)
inline

Implements the SUNION command.

Parameters
sinkThe user-provided callback object.
keysKey names of the sets that are combined with each other.
void SunionStore ( IntegerSink  sink,
string  destination,
params string[]  keys 
)
inline

Implements the SUNIONSTORE command.

Parameters
sinkThe user-provided callback object.
destinationKey name of the set used to store the result.
keysKey names of the sets that are combined with each other.
void SwapDb ( SimpleStringSink  sink,
int  indexOne,
int  indexTwo 
)
inline

Implements the SWAPDB command.

Parameters
sinkThe user-provided callback object.
indexOneThe index of the Redis databases that is swapped with indexTwo.
indexTwoThe index of the Redis databases that is swapped with indexOne.
void Time ( ArraySink  sink)
inline

Implements the TIME command.

Parameters
sinkThe user-provided callback object.
void Touch ( IntegerSink  sink,
params string[]  keys 
)
inline

Implements the TOUCH command.

Parameters
sinkThe user-provided callback object.
keysKey name(s) to touch.
void Ttl ( IntegerSink  sink,
string  key 
)
inline

Implements the TTL command.

Parameters
sinkThe user-provided callback object.
keyThe key whose TTL (in seconds) is returned.
void Type ( SimpleStringSink  sink,
string  key 
)
inline

Implements the TYPE command.

Parameters
sinkThe user-provided callback object.
keyThe key name whose type is returned.
void Unlink ( IntegerSink  sink,
params string[]  keys 
)
inline

Implements the UNLINK command.

Parameters
sinkThe user-provided callback object.
keysThe key name(s) to unlink.
void Unwatch ( SimpleStringSink  sink)
inline

Implements the UNWATCH command.

Parameters
sinkThe user-provided callback object.
void Wait ( IntegerSink  sink,
int  numReplicas,
int  timeout 
)
inline

Implements the WAIT command.

Parameters
sinkThe user-provided callback object.
numReplicasThe number of replicas to wait for.
timeoutThe timeout for the operation, in milliseconds.
void Watch ( SimpleStringSink  sink,
params string[]  keys 
)
inline

Implements the WATCH command.

Parameters
sinkThe user-provided callback object.
keysThe key(s) to watch.
void Xack ( IntegerSink  sink,
string  key,
string  group,
params string[]  ids 
)
inline

Implements the XACK command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream whose messages are acknowledged.
groupThe stream consumer group.
idsIDs of messages to acknowledge.
void Xadd ( BulkStringSink  sink,
string  key,
string  id,
params FieldValuePair[]  pairs 
)
inline

Implements the XADD command.

Specify the stream entry ID as "*" to auto-generate a unique ID.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream to which the stream entry is added.
idStream entry ID.
pairsField/value pairs that are added to the stream.
void Xclaim ( ArraySink  sink,
string  key,
string  group,
string  consumer,
int  minIdleTime,
XclaimOptions  options,
params string[]  ids 
)
inline

Implements the XCLAIM command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream containing group.
groupThe consumer group the originally owned the messages being claimed.
consumerThe consumer group that is claiming the messages.
minIdleTimeThe minimum amount of time a message must be idle before it can be claimed.
optionsAdditional options for the XCLAIM command (e.g. IDLE, TIME, RETRYCOUNT, FORCE, and JUSTID).
idsIDs of messages to claim.
void Xdel ( IntegerSink  sink,
string  key,
params string[]  ids 
)
inline

Implements the XDEL command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream from which ids are deleted.
idsStream entry IDs to delete.
void XgroupCreate ( SimpleStringSink  sink,
string  key,
string  groupname,
XgroupCreateOptions  options 
)
inline

Implements the XGROUP command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream in which the new group will be created.
groupnameThe name of the consumer group to create.
optionsAdditional options for the XGROUP command (id, MKSTREAM).
void XgroupDelConsumer ( IntegerSink  sink,
string  key,
string  groupname,
string  consumername 
)
inline

Implements the XGROUP command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream containing the given group.
groupnameThe group from which the given consumer is removed.
consumernameName of the consumer to remove.
void XgroupDestroy ( IntegerSink  sink,
string  key,
string  groupname 
)
inline

Implements the XGROUP command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream containing the given group.
groupnameThe name of the consumer group to remove.
void XgroupHelp ( ArraySink  sink)
inline

Implements the XGROUP command.

Parameters
sinkThe user-provided callback object.
void XgroupSetid ( SimpleStringSink  sink,
string  key,
string  groupname,
string  id = null 
)
inline

Implements the XGROUP command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream containing the given group.
groupnameThe name of the consumer group whose "last delivered ID" is changed.
idThe new value of the group's "last delivered ID".
void XinfoConsumers ( ArraySink  sink,
string  key,
string  groupname 
)
inline

Implements the XINFO command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream containing the given group.
groupnameThe name of the group whose consumers are returned.
void XinfoGroups ( ArraySink  sink,
string  key 
)
inline

Implements the XINFO command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream whose consumer groups are returned.
void XinfoHelp ( ArraySink  sink)
inline

Implements the XINFO command.

Parameters
sinkThe user-provided callback object.
void XinfoStream ( ArraySink  sink,
string  key 
)
inline

Implements the XINFO command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream whose general info is returned.
void Xlen ( IntegerSink  sink,
string  key 
)
inline

Implements the XLEN command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream whose length is returned.
void Xpending ( ArraySink  sink,
string  key,
string  group,
XpendingOptions  options = null 
)
inline

Implements the XPENDING command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream containing group.
groupThe name of the consumer group whose Pending Entry List is inspected.
optionsAdditional options for the XPENDING command (e.g. start/end/count, consumer).
void Xrange ( ArraySink  sink,
string  key,
string  start,
string  end,
int  count 
)
inline

Implements the XRANGE command.

The special IDs - and + can be used to specify the minimum and maximum possible IDs, respectively.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream whose messages are returned.
startThe start ID of the range to return.
endThe end ID of the range to return.
countThe maximum number of items to return.
void Xrange ( ArraySink  sink,
string  key,
string  start,
string  end 
)
inline

Implements the XRANGE command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream whose messages are returned.
startThe start ID of the range to return.
endThe end ID of the range to return.
void Xread ( ArraySink  sink,
XReadOptions  options,
params XReadKeyIdPair[]  pairs 
)
inline

Implements the XREAD command.

Parameters
sinkThe user-provided callback object.
optionsAdditional options for the XREAD command (e.g. COUNT, BLOCK).
pairsPairs of stream key names with associated message IDs to read.
void XreadGroup ( ArraySink  sink,
string  group,
string  consumer,
XReadGroupOptions  options,
params XReadKeyIdPair[]  pairs 
)
inline

Implements the XREADGROUP command.

Parameters
sinkThe user-provided callback object.
groupThe name of the consumer group associated with the stream.
consumerThe name of the consumer within group.
optionsAdditional options for the XREADGROUP command (e.g. COUNT, BLOCK, NOACK).
pairsPairs of stream key names with associated message IDs to read.
void XrevRange ( ArraySink  sink,
string  key,
string  start,
string  end,
int  count 
)
inline

Implements the XREVRANGE command.

The special IDs - and + can be used to specify the minimum and maximum possible IDs, respectively. Note: position of start/end is reversed when sent to the server.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream whose messages are returned.
startThe start ID of the range to return.
endThe end ID of the range to return.
countThe maximum number of items to return.
void XrevRange ( ArraySink  sink,
string  key,
string  start,
string  end 
)
inline

Implements the XREVRANGE command.

The special IDs - and + can be used to specify the minimum and maximum possible IDs, respectively. Note: position of start/end is reversed when sent to the server.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream whose messages are returned.
startThe start ID of the range to return.
endThe end ID of the range to return.
void Xtrim ( IntegerSink  sink,
string  key,
int  count,
bool  approximateCount = false 
)
inline

Implements the XTRIM command.

Parameters
sinkThe user-provided callback object.
keyKey name of the stream whose length is trimmed.
countThe length the stream is trimmed to.
approximateCountFlag indicating that the new length need not be exact (i.e. the new length will be at or above count).
void Zadd ( IntegerSink  sink,
string  key,
ZaddOptions  options,
params ZaddScoreMemberPair[]  pairs 
)
inline

Implements the ZADD command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set that the score/member pairs are added to.
optionsAdditional options for the ZADD command (e.g. already/not exists, return changed).
pairsThe score/member pairs to add.
void ZaddWithIncr ( BulkStringSink  sink,
string  key,
ZaddOptions  options,
ZaddScoreMemberPair  pair 
)
inline

Implements the ZADD command.

If the ZADD command specifies the INCR option (as this method does), the return value will be a Bulk string reply.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set that the score/member pair is added to.
optionsAdditional options for the ZADD command (e.g. already/not exists, return changed).
pairThe score/member pair to add.
void Zcard ( IntegerSink  sink,
string  key 
)
inline

Implements the ZCARD command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose cardinality is returned.
void Zcount ( IntegerSink  sink,
string  key,
string  min,
string  max 
)
inline

Implements the ZCOUNT command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are counted.
minThe minimum score to include in the count.
maxThe maximum score to include in the count.
void ZincrBy ( BulkStringSink  sink,
string  key,
double  increment,
string  member 
)
inline

Implements the ZINCRBY command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set containing member.
incrementThe amount to increment the member's score.
memberThe member whose score is incremented.
void ZinterStore ( IntegerSink  sink,
string  destination,
ZstoreOptions  options,
params string[]  keys 
)
inline

Implements the ZINTERSTORE command.

Parameters
sinkThe user-provided callback object.
destinationKey name of the sorted set used to store the result.
optionsAdditional options for the ZINTERSTORE command (e.g. WEIGHTS, AGGREGATE).
keysKey names of the sorted sets that are intersected with each other.
void ZlexCount ( IntegerSink  sink,
string  key,
string  min,
string  max 
)
inline

Implements the ZLEXCOUNT command.

Valid values for min/max, also referred to as start/stop values, begin with ( or [ (specifying exclusivity or inclusivity), or the special values -/+ for negative/positive infinity.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose lexcount is calculated for the given min/max.
minThe "start" value of the interval.
maxThe "stop" value of the interval.
void ZpopMax ( ArraySink  sink,
string  key,
int  count = 1 
)
inline

Implements the ZPOPMAX command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are popped and returned.
countThe number of items to pop from the set.
void ZpopMin ( ArraySink  sink,
string  key,
int  count = 1 
)
inline

Implements the ZPOPMIN command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are popped and returned.
countThe number of items to pop from the set.
void Zrange ( ArraySink  sink,
string  key,
int  start,
int  stop,
bool  withScores = false 
)
inline

Implements the ZRANGE command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are returned (ordered from lowest to highest score).
startThe zero-based index of the first element in the range.
stopThe zero-based index of the last element in the range.
withScoresFlag indicating that element scores should be returned in addition to their values.
void ZrangeByLex ( ArraySink  sink,
string  key,
string  min,
string  max,
Limit  limit = null 
)
inline

Implements the ZRANGEBYLEX command.

Valid values for min/max, also referred to as start/stop values, begin with ( or [ (specifying exclusivity or inclusivity), or the special values -/+ for negative/positive infinity.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are returned.
minThe "start" value of the interval.
maxThe "stop" value of the interval.
limitAn optional offset/count that limits the number of items returned.
void ZrangeByScore ( ArraySink  sink,
string  key,
string  min,
string  max,
ZrangeByScoreOptions  options 
)
inline

Implements the ZRANGEBYSCORE command.

Values for min/max are inclusive by default, but can be made exclusive by prefixing the score with (. The lowest/highest scores can be generically specified with "-inf" and "+inf", respectively.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are returned.
minThe minimum score in the range.
maxThe maximum score in the range.
optionsAdditional options for the ZRANGEBYSCORE command (e.g. WITHSCORES, LIMIT)
void Zrank ( ArraySink  sink,
string  key,
string  member 
)
inline

Implements the ZRANK command. From docs: If member exists in the sorted set, Integer reply: the rank of member. If member does not exist in the sorted set or key does not exist, Bulk string reply: nil

Because of this, we use an ArraySink as a catch-all. The caller should be aware that only BulkString and Integer related methods will be called (or Error of course).

Rank is zero-based, with a rank of 0 being the element with the lowest score.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set containing member.
memberThe value of the element whose rank is returned.
void Zrem ( IntegerSink  sink,
string  key,
params string[]  members 
)
inline

Implements the ZREM command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are removed.
membersThe value of each element to remove.
void ZremRangeByLex ( IntegerSink  sink,
string  key,
string  min,
string  max 
)
inline

Implements the ZREMRANGEBYLEX command.

Valid values for min/max, begin with ( or [ (specifying exclusivity or inclusivity), or the special values -/+ for negative/positive infinity.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are removed.
minThe "start" value of the interval.
maxThe "stop" value of the interval.
void ZremRangeByRank ( IntegerSink  sink,
string  key,
int  start,
int  stop 
)
inline

Implements the ZREMRANGEBYRANK command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are removed.
startZero-based rank index of the first element in the range.
stopZero-based rank index of the last element in the range.
void ZremRangeByScore ( IntegerSink  sink,
string  key,
string  min,
string  max 
)
inline

Implements the ZREMRANGEBYSCORE command.

Values for min/max are inclusive by default, but can be made exclusive by prefixing the score with (. The lowest/highest scores can be generically specified with "-inf" and "+inf", respectively.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are removed.
minThe minimum score in the range.
maxThe maximum score in the range.
void ZrevRange ( ArraySink  sink,
string  key,
int  start,
int  stop,
bool  withScores 
)
inline

Implements the ZREVRANGE command. Note: position of start/stop is USUALLY reversed (in all other REV commands), but not with this command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are returned (ordered from highest to lowest score).
startThe zero-based index of the first element in the range.
stopThe zero-based index of the last element in the range.
withScoresFlag indicating that element scores should be returned in addition to their values.
void ZrevRangeByLex ( ArraySink  sink,
string  key,
string  min,
string  max,
Limit  limit = null 
)
inline

Implements the ZREVRANGEBYLEX command. Note: position of min/max is reversed when sent to the server.

Valid values for min/max, also referred to as start/stop values, begin with ( or [ (specifying exclusivity or inclusivity), or the special values -/+ for negative/positive infinity.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are returned (in reverse order).
minThe "start" value of the interval.
maxThe "stop" value of the interval.
limitAn optional offset/count that limits the number of items returned.
void ZrevRangeByScore ( ArraySink  sink,
string  key,
string  min,
string  max,
ZrangeByScoreOptions  options 
)
inline

Implements the ZREVRANGEBYSCORE command. Note: position of min/max is reversed when sent to the server.

Values for min/max are inclusive by default, but can be made exclusive by prefixing the score with (. The lowest/highest scores can be generically specified with "-inf" and "+inf", respectively.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set whose elements are returned (in reverse order).
minThe minimum score in the range.
maxThe maximum score in the range.
optionsAdditional options for the ZRANGEBYSCORE command (e.g, WITHSCORES, LIMIT)
void ZrevRank ( ArraySink  sink,
string  key,
string  member 
)
inline

Implements the ZREVRANK command. From docs: If member exists in the sorted set, Integer reply: the rank of member. If member does not exist in the sorted set or key does not exist, Bulk string reply: nil

Because of this, we use an ArraySink as a catch-all. The caller should be aware that only BulkString and Integer related methods will be called (or Error of course).

Rank is zero-based, with a rank of 0 being the element with the highest score.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set containing member.
memberThe value of the element whose rank is returned.
void Zscan ( ArraySink  sink,
string  key,
ulong  cursor,
ScanOptions  options 
)
inline

Implements the ZSCAN command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set that is iterated.
cursorThe cursor returned by the previous call to Zscan() (or 0 to start a new iteration).
optionsAdditional options for the ZSCAN command (e.g. MATCH, COUNT).
void Zscore ( BulkStringSink  sink,
string  key,
string  member 
)
inline

Implements the ZSCORE command.

Parameters
sinkThe user-provided callback object.
keyKey name of the sorted set containing member.
memberThe member whose score is returned.
void ZunionStore ( IntegerSink  sink,
string  destination,
ZstoreOptions  options,
params string[]  keys 
)
inline

Implements the ZUNIONSTORE command.

Parameters
sinkThe user-provided callback object.
destinationKey name of the sorted set used to store the result.
optionsAdditional options for the ZUNIONSTORE command (e.g. WEIGHTS, AGGREGATE).
keysKey names of the sorted sets that are combined with each other.

The documentation for this class was generated from the following files: