Class PHPMemcacheSessionLocator

java.lang.Object
net.rubyeye.xmemcached.impl.AbstractMemcachedSessionLocator
net.rubyeye.xmemcached.impl.PHPMemcacheSessionLocator
All Implemented Interfaces:
MemcachedSessionLocator

public class PHPMemcacheSessionLocator extends AbstractMemcachedSessionLocator
Session locator base on hash(key) mod sessions.size(). Uses the PHP memcached hash strategy so it's easier to share data with PHP based clients.
  • Field Details

  • Constructor Details

    • PHPMemcacheSessionLocator

      public PHPMemcacheSessionLocator()
    • PHPMemcacheSessionLocator

      public PHPMemcacheSessionLocator(HashAlgorithm hashAlgorithm)
  • Method Details

    • setHashAlgorighm

      public final void setHashAlgorighm(HashAlgorithm hashAlgorithm)
    • getHash

      public final long getHash(int size, String key)
    • getSessionByKey

      public final Session getSessionByKey(String key)
      Description copied from interface: MemcachedSessionLocator
      Returns a session by special key.
      Parameters:
      key -
      Returns:
    • getNext

      public final long getNext(int size, long start)
    • updateSessions

      public final void updateSessions(Collection<Session> list)
      Description copied from interface: MemcachedSessionLocator
      Update sessions when session was added or removed.
      Parameters:
      list - The newer sessions