public long HSetNx(string key, string field, string value) { RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? 0L : client.HSetNX(key, UTF8String.ToBytes(field), UTF8String.ToBytes(value))); }
public string[] Hvals(string key) { RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? null : UTF8String.ToStringArray(client.HVals(key))); }
public string BRPopLPush(string fromKey, string toKey, int timeOutSecs) { RedisNativeClient client = this.pool.GetRedisClient(fromKey, toKey); return((client == null) ? null : UTF8String.ToString(client.BRPopLPush(fromKey, toKey, timeOutSecs))); }
public string[] HMGet(string key, params string[] fields) { if (!this.IsValidFields(fields)) { return(null); } RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? null : UTF8String.ToStringArray(client.HMGet(key, UTF8String.ToBytesArray(fields)))); }
public long RPushX(string key, string value) { RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? 0L : client.RPushX(key, UTF8String.ToBytes(value))); }
public string[] BRPop(string key, int timeOutSecs) { RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? null : UTF8String.ToStringArray(client.BRPop(key, timeOutSecs))); }
public long LRem(string key, int removeNoOfMatches, string value) { RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? 0L : client.LRem(key, removeNoOfMatches, UTF8String.ToBytes(value))); }
public string RPop(string key) { RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? null : UTF8String.ToString(client.RPop(key))); }
public string[] LRange(string key, int start, int end) { RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? null : UTF8String.ToStringArray(client.LRange(key, start, end))); }
//------------------------------------------------------------------ // LIST public string LIndex(string key, int index) { RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? null : UTF8String.ToString(client.LIndex(key, index))); }
public string RemoveEndFromList(string listId) { RedisNativeClient client = this.pool.GetRedisClient(listId); return((client == null) ? null : UTF8String.ToString(client.RPop(listId))); }
public List <string> GetRangeFromList(string key, int start, int end) { RedisNativeClient client = this.pool.GetRedisClient(key); return((client == null) ? null : UTF8String.ToStringList(client.LRange(key, start, end))); }
public long PrependItemToList(string listId, string value) { RedisNativeClient client = this.pool.GetRedisClient(listId); return((client == null) ? 0L : client.LPush(listId, UTF8String.ToBytes(value))); }