Package redis.netty4

Examples of redis.netty4.Reply.data()


      os = Unpooled.buffer();
      String message = "OK";
      new StatusReply(message).write(os);
      receive = redisDecoder.receive(os);
      assertTrue(receive instanceof StatusReply);
      assertEquals(message, receive.data());
    }
    {
      os = Unpooled.buffer();
      String message = "OK";
      new ErrorReply(message).write(os);
View Full Code Here


      os = Unpooled.buffer();
      String message = "OK";
      new ErrorReply(message).write(os);
      receive = redisDecoder.receive(os);
      assertTrue(receive instanceof ErrorReply);
      assertEquals(message, receive.data());
    }
    {
      os = Unpooled.buffer();
      String message = "OK";
      new BulkReply(Unpooled.wrappedBuffer(message.getBytes())).write(os);
View Full Code Here

      os = Unpooled.buffer();
      String message = "OK";
      new BulkReply(Unpooled.wrappedBuffer(message.getBytes())).write(os);
      receive = redisDecoder.receive(os);
      assertTrue(receive instanceof BulkReply);
      assertEquals(message, ((ByteBuf)receive.data()).toString(Charsets.US_ASCII));
    }
    {
      os = Unpooled.buffer();
      long integer = 999;
      new IntegerReply(integer).write(os);
View Full Code Here

      os = Unpooled.buffer();
      long integer = 999;
      new IntegerReply(integer).write(os);
      receive = redisDecoder.receive(os);
      assertTrue(receive instanceof IntegerReply);
      assertEquals(integer, receive.data());
    }
    {
      os = Unpooled.buffer();
      String message = "OK";
      long integer = 999;
View Full Code Here

              new MultiBulkReply(new Reply[] { new StatusReply(message)}),
              new BulkReply(Unpooled.wrappedBuffer(message.getBytes())),
              new IntegerReply(integer)}).write(os);
      receive = redisDecoder.receive(os);
      assertTrue(receive instanceof MultiBulkReply);
      Reply[] data = (Reply[]) receive.data();
      assertEquals(message, data[0].data());
      assertEquals(message, data[1].data());
      assertTrue(data[2] instanceof MultiBulkReply);
      Reply[] data2 = (Reply[]) data[2].data();
      assertEquals(message, data2[0].data());
View Full Code Here

    } else {
      if (msg.isInline()) {
        if (reply == null) {
          reply = new InlineReply(null);
        } else {
          reply = new InlineReply(reply.data());
        }
      }
      if (reply == null) {
        reply = NYI_REPLY;
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.