Examples of ByteBufferCodecFactory


Examples of com.google.code.yanf4j.core.impl.ByteBufferCodecFactory

    ByteBufferCodecFactory codecFactory;


    @Before
    public void setUp() {
        this.codecFactory = new ByteBufferCodecFactory();
    }
View Full Code Here

Examples of com.google.code.yanf4j.core.impl.ByteBufferCodecFactory

    }


    @Test
    public void testDirectEncoder() throws Exception {
        this.codecFactory = new ByteBufferCodecFactory(true);
        IoBuffer msg = IoBuffer.allocate(100);
        IoBuffer buffer = this.codecFactory.getEncoder().encode(msg, null);
        Assert.assertTrue(buffer.isDirect());
    }
View Full Code Here

Examples of com.google.code.yanf4j.core.impl.ByteBufferCodecFactory

    assertEquals("1.28", decodedCommand.getResult());
  }

  public MemcachedTCPSession buildSession() {
    NioSessionConfig sessionConfig = new NioSessionConfig(null,
        new HandlerAdapter(), null, new ByteBufferCodecFactory(), null,
        null, null, true, 0, 0);
    return new MemcachedTCPSession(sessionConfig, 16 * 1024, null, 0,
        new TextCommandFactory());
  }
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.