Examples of KetamaMemcachedSessionLocator


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

Examples of net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator

public class KetamaMemcachedSessionLocatorUnitTest extends
    AbstractMemcachedSessionLocatorUnitTest {

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

Examples of net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator

    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

Examples of net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator

public class KetamaMemcachedSessionLocatorUnitTest extends
    AbstractMemcachedSessionLocatorUnitTest {

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

Examples of net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator

    }
  }

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

Examples of net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator

  }

  @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

Examples of net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator

  }

  @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

Examples of net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator

    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
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.