Package net.rubyeye.xmemcached.impl
Class ElectionMemcachedSessionLocator
- java.lang.Object
-
- net.rubyeye.xmemcached.impl.AbstractMemcachedSessionLocator
-
- net.rubyeye.xmemcached.impl.ElectionMemcachedSessionLocator
-
- All Implemented Interfaces:
MemcachedSessionLocator
public class ElectionMemcachedSessionLocator extends AbstractMemcachedSessionLocator
Election hash strategy- Author:
- dennis
-
-
Field Summary
-
Fields inherited from class net.rubyeye.xmemcached.impl.AbstractMemcachedSessionLocator
failureMode
-
-
Constructor Summary
Constructors Constructor Description ElectionMemcachedSessionLocator()ElectionMemcachedSessionLocator(HashAlgorithm hashAlgorithm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessiongetSessionByKey(String key)Returns a session by special key.voidupdateSessions(Collection<Session> list)Update sessions when session was added or removed.-
Methods inherited from class net.rubyeye.xmemcached.impl.AbstractMemcachedSessionLocator
setFailureMode
-
-
-
-
Constructor Detail
-
ElectionMemcachedSessionLocator
public ElectionMemcachedSessionLocator()
-
ElectionMemcachedSessionLocator
public ElectionMemcachedSessionLocator(HashAlgorithm hashAlgorithm)
-
-
Method Detail
-
getSessionByKey
public Session getSessionByKey(String key)
Description copied from interface:MemcachedSessionLocatorReturns a session by special key.- Returns:
-
updateSessions
public void updateSessions(Collection<Session> list)
Description copied from interface:MemcachedSessionLocatorUpdate sessions when session was added or removed.- Parameters:
list- The newer sessions
-
-