public long RPush(string listId, object value, long db) { using (var client = this.GetPersistentRedisClient(db)) { var buffer = RedisHeler.ObjectToBytes(value); return(client.RPush(listId, buffer)); } }
public object LPop(string listId, long db) { using (var client = this.GetPersistentRedisClient(db)) { var buffer = client.LPop(listId); var value = RedisHeler.BytesToObject(buffer); return(value); } }
public object RPop(string listId, long db) { using (var client = this.GetPersistentRedisClient(db)) { var buffer = client.RPop(listId); object value = null; if (buffer != null && buffer.Count() > 0) { value = RedisHeler.BytesToObject(buffer); } return(value); } }