Package net.rubyeye.xmemcached.impl

Examples of net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator


    if (sessionLocatorNameEquals(ArrayMemcachedSessionLocator.class)) {
      return new ArrayMemcachedSessionLocator(getHashAlgorithm());
    }

    if (sessionLocatorNameEquals(KetamaMemcachedSessionLocator.class)) {
      return new KetamaMemcachedSessionLocator(getHashAlgorithm());
    }

    throw new IllegalArgumentException("Unsupported "
        + PROP_SESSION_LOCATOR + " value: " + getCommandFactoryName());
  }
View Full Code Here


public class KetamaMemcachedSessionLocatorUnitTest extends
    AbstractMemcachedSessionLocatorUnitTest {

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

    if (sessionLocatorNameEquals(ArrayMemcachedSessionLocator.class)) {
      return new ArrayMemcachedSessionLocator(getHashAlgorithm());
    }

    if (sessionLocatorNameEquals(KetamaMemcachedSessionLocator.class)) {
      return new KetamaMemcachedSessionLocator(getHashAlgorithm());
    }

    if (sessionLocatorNameEquals(PHPMemcacheSessionLocator.class)) {
      return new PHPMemcacheSessionLocator(getHashAlgorithm());
    }
View Full Code Here

public class KetamaMemcachedSessionLocatorUnitTest extends
    AbstractMemcachedSessionLocatorUnitTest {

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

    }
  }

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

  }

  @Test
  public void testSessionKey_CompatibleWithNginxUpstreamConsistent() {

    this.locator = new KetamaMemcachedSessionLocator(true);

    MockSession session1 = new MockSession("127.0.0.1", 11211);
    MockSession session2 = new MockSession("127.0.0.1", 11212);
    MockSession session3 = new MockSession("127.0.0.1", 11213);
    List<Session> list = new ArrayList<Session>();
View Full Code Here

  }

  @Test
  public void testSessionKey_CompatibleWithNginxUpstreamConsistent_DefaultPort() {

    this.locator = new KetamaMemcachedSessionLocator(true);

    MockSession session1 = new MockSession("192.168.1.1", 11211);
    MockSession session2 = new MockSession("192.168.1.2", 11211);
    MockSession session3 = new MockSession("192.168.1.3", 11211);
    List<Session> list = new ArrayList<Session>();
View Full Code Here

    sessionLocator.updateSessions(sessions);
    assertNull(sessionLocator.getSessionByKey(key));
  }

  public void testKetamaMemcachedSessionLocator() {
    sessionLocator = new KetamaMemcachedSessionLocator(
        HashAlgorithm.NATIVE_HASH);
    List<Session> sessions = new ArrayList<Session>();
    for (int i = 8080; i < 8100; i++) {
      sessions.add(new MockSession(i));
    }
View Full Code Here

TOP

Related Classes of net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator

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.