Class LibmemcachedMemcachedSessionLocator
java.lang.Object
net.rubyeye.xmemcached.impl.AbstractMemcachedSessionLocator
net.rubyeye.xmemcached.impl.LibmemcachedMemcachedSessionLocator
- All Implemented Interfaces:
MemcachedSessionLocator
Consistent Hash Algorithm implementation is compatible with libmemcached method.
- Author:
- dennis
-
Field Summary
Fields inherited from class AbstractMemcachedSessionLocator
failureMode -
Constructor Summary
ConstructorsConstructorDescriptionLibmemcachedMemcachedSessionLocator(int numReps, HashAlgorithm hashAlgorithm) -
Method Summary
Modifier and TypeMethodDescriptionfinal SessiongetSessionByHash(long hash) final SessiongetSessionByKey(String key) Returns a session by special key.final longfinal voidupdateSessions(Collection<Session> list) Update sessions when session was added or removed.Methods inherited from class AbstractMemcachedSessionLocator
setFailureMode
-
Constructor Details
-
LibmemcachedMemcachedSessionLocator
public LibmemcachedMemcachedSessionLocator() -
LibmemcachedMemcachedSessionLocator
-
-
Method Details
-
getSessionByKey
Description copied from interface:MemcachedSessionLocatorReturns a session by special key.- Parameters:
key-- Returns:
-
getSessionByHash
-
nextHash
-
updateSessions
Description copied from interface:MemcachedSessionLocatorUpdate sessions when session was added or removed.- Parameters:
list- The newer sessions
-