Class RoundRobinMemcachedSessionLocator

  • All Implemented Interfaces:
    MemcachedSessionLocator

    public class RoundRobinMemcachedSessionLocator
    extends java.lang.Object
    implements MemcachedSessionLocator
    A round-robin session locator for some special applications,memcacheq or kestrel etc.They doesn't need the same key must always to be stored in same memcached but want to make a cluster.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<Session> sessions  
      private java.util.concurrent.atomic.AtomicInteger sets  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Session getSessionByKey​(java.lang.String key)
      Returns a session by special key.
      void setFailureMode​(boolean failureMode)
      Configure failure mode
      void updateSessions​(java.util.Collection<Session> list)
      Update sessions when session was added or removed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • sessions

        private transient volatile java.util.List<Session> sessions
      • sets

        private java.util.concurrent.atomic.AtomicInteger sets
    • Constructor Detail

      • RoundRobinMemcachedSessionLocator

        public RoundRobinMemcachedSessionLocator()