Examples of TextCommandFactory


Examples of net.rubyeye.xmemcached.command.TextCommandFactory

  public XMemcachedClient() throws IOException {
    super();
    this.buildConnector(new ArrayMemcachedSessionLocator(),
        new SimpleBufferAllocator(), XMemcachedClientBuilder
            .getDefaultConfiguration(), XMemcachedClientBuilder
            .getDefaultSocketOptions(), new TextCommandFactory(),
        new SerializingTranscoder());
    this.start0();
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.command.TextCommandFactory

    }
    BufferAllocator simpleBufferAllocator = new SimpleBufferAllocator();
    this.buildConnector(new ArrayMemcachedSessionLocator(),
        simpleBufferAllocator, XMemcachedClientBuilder
            .getDefaultConfiguration(), XMemcachedClientBuilder
            .getDefaultSocketOptions(), new TextCommandFactory(),
        new SerializingTranscoder());
    this.start0();
    for (InetSocketAddress inetSocketAddress : addressList) {
      this.connect(new InetSocketAddressWrapper(inetSocketAddress,
          this.serverOrderCount.incrementAndGet(), 1, null));
View Full Code Here

Examples of net.rubyeye.xmemcached.command.TextCommandFactory

  protected BufferAllocator bufferAllocator;

  @Override
  public void setUp() {
    this.bufferAllocator = new SimpleBufferAllocator();
    this.commandFactory = new TextCommandFactory();
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.command.TextCommandFactory

        + PROP_SESSION_LOCATOR + " value: " + getCommandFactoryName());
  }

  protected CommandFactory getCommandFactory() {
    if (commandFactoryNameEquals(TextCommandFactory.class)) {
      return new TextCommandFactory();
    }

    if (commandFactoryNameEquals(BinaryCommandFactory.class)) {
      return new BinaryCommandFactory();
    }
View Full Code Here

Examples of net.rubyeye.xmemcached.command.TextCommandFactory

  private CommandFactory commandFactory;

  @Override
  protected void setUp() throws Exception {
    this.optimiezer = new Optimizer(Protocol.Text);
    this.commandFactory = new TextCommandFactory();
    this.optimiezer.setBufferAllocator(new SimpleBufferAllocator());
    this.writeQueue = new LinkedTransferQueue<Command>();
    this.executingCmds = new LinkedTransferQueue<Command>();
    for (int i = 0; i < 10; i++) {
      Command cmd = this.commandFactory.createGetCommand(String
View Full Code Here

Examples of net.rubyeye.xmemcached.command.TextCommandFactory

  private CommandFactory commandFactory;

  @Override
  protected void setUp() throws Exception {
    this.commandFactory = new TextCommandFactory(
        );
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.command.TextCommandFactory

  private Decoder decoder;

  public void testDecode() {
    decoder = new MemcachedCodecFactory().getDecoder();
    MemcachedTCPSession session = buildSession();
    Command versionCommand = new TextCommandFactory().createVersionCommand(
        new CountDownLatch(1), null);
    session.addCommand(versionCommand);
    Command decodedCommand = (Command) decoder.decode(IoBuffer
        .wrap(ByteBuffer.wrap("VERSION 1.28\r\n".getBytes())), session);
    assertSame(decodedCommand, versionCommand);
View Full Code Here

Examples of net.rubyeye.xmemcached.command.TextCommandFactory

  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

Examples of net.rubyeye.xmemcached.command.TextCommandFactory

public class MemcachedEncoderUnitTest extends TestCase {
  private Encoder encoder;

  public void testEncode() {
    this.encoder = new MemcachedCodecFactory().getEncoder();
    Command command = new TextCommandFactory().createVersionCommand(
        new CountDownLatch(1), null);
    command.encode();
    IoBuffer buffer = this.encoder.encode(command, null);
    assertEquals(buffer.buf(), ServerAddressAware.VERSION);
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.command.TextCommandFactory

        + PROP_SESSION_LOCATOR + " value: " + getCommandFactoryName());
  }

  protected CommandFactory getCommandFactory() {
    if (commandFactoryNameEquals(TextCommandFactory.class)) {
      return new TextCommandFactory();
    }

    if (commandFactoryNameEquals(BinaryCommandFactory.class)) {
      return new BinaryCommandFactory();
    }
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.