Class RedissonSessionRepository

  • All Implemented Interfaces:
    EventListener, PatternMessageListener<String>, org.springframework.session.FindByIndexNameSessionRepository<org.redisson.spring.session.RedissonSessionRepository.RedissonSession>, org.springframework.session.SessionRepository<org.redisson.spring.session.RedissonSessionRepository.RedissonSession>

    public class RedissonSessionRepository
    extends Object
    implements org.springframework.session.FindByIndexNameSessionRepository<org.redisson.spring.session.RedissonSessionRepository.RedissonSession>, PatternMessageListener<String>
    Author:
    Nikita Koksharov
    • Constructor Detail

      • RedissonSessionRepository

        public RedissonSessionRepository​(RedissonClient redissonClient,
                                         org.springframework.context.ApplicationEventPublisher eventPublisher)
    • Method Detail

      • setDefaultMaxInactiveInterval

        public void setDefaultMaxInactiveInterval​(int defaultMaxInactiveInterval)
      • createSession

        public org.redisson.spring.session.RedissonSessionRepository.RedissonSession createSession()
        Specified by:
        createSession in interface org.springframework.session.SessionRepository<org.redisson.spring.session.RedissonSessionRepository.RedissonSession>
      • save

        public void save​(org.redisson.spring.session.RedissonSessionRepository.RedissonSession session)
        Specified by:
        save in interface org.springframework.session.SessionRepository<org.redisson.spring.session.RedissonSessionRepository.RedissonSession>
      • getSession

        public org.redisson.spring.session.RedissonSessionRepository.RedissonSession getSession​(String id)
        Specified by:
        getSession in interface org.springframework.session.SessionRepository<org.redisson.spring.session.RedissonSessionRepository.RedissonSession>
      • delete

        public void delete​(String id)
        Specified by:
        delete in interface org.springframework.session.SessionRepository<org.redisson.spring.session.RedissonSessionRepository.RedissonSession>
      • setKeyPrefix

        public void setKeyPrefix​(String keyPrefix)
      • findByIndexNameAndIndexValue

        public Map<String,​org.redisson.spring.session.RedissonSessionRepository.RedissonSession> findByIndexNameAndIndexValue​(String indexName,
                                                                                                                                    String indexValue)
        Specified by:
        findByIndexNameAndIndexValue in interface org.springframework.session.FindByIndexNameSessionRepository<org.redisson.spring.session.RedissonSessionRepository.RedissonSession>