예제 #1
0
 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));
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
     }
 }