Package net.rubyeye.xmemcached.impl
Class PHPMemcacheSessionLocator
java.lang.Object
net.rubyeye.xmemcached.impl.AbstractMemcachedSessionLocator
net.rubyeye.xmemcached.impl.PHPMemcacheSessionLocator
- All Implemented Interfaces:
MemcachedSessionLocator
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 Summary
FieldsFields inherited from class net.rubyeye.xmemcached.impl.AbstractMemcachedSessionLocator
failureMode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal long
final long
getNext
(int size, long start) final Session
getSessionByKey
(String key) Returns a session by special key.final void
setHashAlgorighm
(HashAlgorithm hashAlgorithm) final void
updateSessions
(Collection<Session> list) Update sessions when session was added or removed.Methods inherited from class net.rubyeye.xmemcached.impl.AbstractMemcachedSessionLocator
setFailureMode
-
Field Details
-
hashAlgorithm
-
sessions
-
-
Constructor Details
-
PHPMemcacheSessionLocator
public PHPMemcacheSessionLocator() -
PHPMemcacheSessionLocator
-
-
Method Details
-
setHashAlgorighm
-
getHash
-
getSessionByKey
Description copied from interface:MemcachedSessionLocator
Returns a session by special key.- Parameters:
key
-- Returns:
-
getNext
public final long getNext(int size, long start) -
updateSessions
Description copied from interface:MemcachedSessionLocator
Update sessions when session was added or removed.- Parameters:
list
- The newer sessions
-