Class ArrayMemcachedSessionLocator

    • Field Detail

      • sessions

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

        final java.util.Random rand
    • Constructor Detail

      • ArrayMemcachedSessionLocator

        public ArrayMemcachedSessionLocator()
      • ArrayMemcachedSessionLocator

        public ArrayMemcachedSessionLocator​(HashAlgorithm hashAlgorighm)
    • Method Detail

      • setHashAlgorighm

        public final void setHashAlgorighm​(HashAlgorithm hashAlgorighm)
      • getHash

        public final long getHash​(int size,
                                  java.lang.String key)
      • getSessionByKey

        public final Session getSessionByKey​(java.lang.String key)
        Description copied from interface: MemcachedSessionLocator
        Returns a session by special key.
        Returns:
      • getRandomSession

        private Session getRandomSession​(java.util.List<Session> sessions)
      • getNext

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

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