Package net.rubyeye.xmemcached.transcoders

Examples of net.rubyeye.xmemcached.transcoders.Transcoder


        .buf().array()));
    optimiezeCommand.decode(null, ByteBuffer.wrap("VALUE 0 0 2\r\n10\r\n"
        .getBytes()));

    assertEquals(0, this.currentCmd.getLatch().getCount());
    Transcoder transcoder = new SerializingTranscoder();
    assertEquals("10", transcoder.decode((CachedData) this.currentCmd
        .getResult()));
    for (Command cmd : localQueue) {
      assertEquals(0, cmd.getLatch().getCount());
      assertEquals("10", transcoder.decode((CachedData) this.currentCmd
          .getResult()));
    }
    assertEquals(0, optimiezeCommand.getMergeCount());
  }
View Full Code Here


  public void testCreateStoreCommand() {
    String key = "test";
    String value = "test";
    byte[] keyBytes = ByteUtils.getBytes(key);
    int exp = 0;
    Transcoder transcoder = new StringTranscoder();
    Command storeCmd = this.commandFactory.createSetCommand(key, keyBytes, exp, value,false, transcoder);
    storeCmd.encode();
    assertFalse(storeCmd.isNoreply());
    assertEquals(CommandType.SET, storeCmd.getCommandType());
    String commandStr = new String(storeCmd.getIoBuffer().buf()
View Full Code Here

        .buf().array()));
    optimiezeCommand.decode(null,
        ByteBuffer.wrap("VALUE 0 0 2\r\n10\r\n".getBytes()));

    assertEquals(0, this.currentCmd.getLatch().getCount());
    Transcoder transcoder = new SerializingTranscoder();
    assertEquals("10",
        transcoder.decode((CachedData) this.currentCmd.getResult()));
    for (Command cmd : localQueue) {
      assertEquals(0, cmd.getLatch().getCount());
      assertEquals("10",
          transcoder.decode((CachedData) this.currentCmd.getResult()));
    }
    assertEquals(0, optimiezeCommand.getMergeCount());
  }
View Full Code Here

  public void testCreateStoreCommand() {
    String key = "test";
    String value = "test";
    byte[] keyBytes = ByteUtils.getBytes(key);
    int exp = 0;
    Transcoder transcoder = new StringTranscoder();
    Command storeCmd = this.commandFactory.createSetCommand(key, keyBytes, exp, value,false, transcoder);
    storeCmd.encode();
    assertFalse(storeCmd.isNoreply());
    assertEquals(CommandType.SET, storeCmd.getCommandType());
    String commandStr = new String(storeCmd.getIoBuffer().buf()
View Full Code Here

TOP

Related Classes of net.rubyeye.xmemcached.transcoders.Transcoder

Copyright © 2018 www.massapicom. 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.