Class AbstractInfinispanSessionRepository

java.lang.Object
org.infinispan.spring.common.session.AbstractInfinispanSessionRepository
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware, org.springframework.session.FindByIndexNameSessionRepository<AbstractInfinispanSessionRepository.InfinispanSession>, org.springframework.session.SessionRepository<AbstractInfinispanSessionRepository.InfinispanSession>
Direct Known Subclasses:
InfinispanEmbeddedSessionRepository, InfinispanRemoteSessionRepository

public abstract class AbstractInfinispanSessionRepository extends Object implements org.springframework.session.FindByIndexNameSessionRepository<AbstractInfinispanSessionRepository.InfinispanSession>, org.springframework.context.ApplicationEventPublisherAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Infinispan implementation for Spring Session with basic functionality.
Since:
9.0
Author:
Sebastian Ɓaskawiec
See Also:
  • Field Details

    • applicationEventPublisher

      protected final AbstractApplicationPublisherBridge applicationEventPublisher
    • cache

      protected final SpringCache cache
    • nativeCache

      protected final BasicCache<String,org.springframework.session.MapSession> nativeCache
    • defaultMaxInactiveInterval

      protected Duration defaultMaxInactiveInterval
    • flushMode

      protected org.springframework.session.FlushMode flushMode
    • saveMode

      protected org.springframework.session.SaveMode saveMode
    • indexResolver

      protected org.springframework.session.IndexResolver<org.springframework.session.Session> indexResolver
  • Constructor Details

  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • setApplicationEventPublisher

      public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
      Specified by:
      setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware
    • setDefaultMaxInactiveInterval

      public void setDefaultMaxInactiveInterval(Duration defaultMaxInactiveInterval)
      Set the maximum inactive interval in seconds between requests before newly created sessions will be invalidated. A negative time indicates that the session will never time out. The default is 30 minutes.
      Parameters:
      defaultMaxInactiveInterval - the default maxInactiveInterval
    • setIndexResolver

      public void setIndexResolver(org.springframework.session.IndexResolver<org.springframework.session.Session> indexResolver)
      Set the IndexResolver to use.
      Parameters:
      indexResolver - the index resolver
    • setFlushMode

      public void setFlushMode(org.springframework.session.FlushMode flushMode)
      Sets the flush mode. Default flush mode is FlushMode.ON_SAVE.
      Parameters:
      flushMode - the new Hazelcast flush mode
    • setSaveMode

      public void setSaveMode(org.springframework.session.SaveMode saveMode)
      Set the save mode. Default save mode is SaveMode.ON_SET_ATTRIBUTE.
      Parameters:
      saveMode - the save mode
    • createSession

      Specified by:
      createSession in interface org.springframework.session.SessionRepository<AbstractInfinispanSessionRepository.InfinispanSession>
    • save

      Specified by:
      save in interface org.springframework.session.SessionRepository<AbstractInfinispanSessionRepository.InfinispanSession>
    • removeFromCacheWithoutNotifications

      protected abstract void removeFromCacheWithoutNotifications(String originalId)
    • findById

      Specified by:
      findById in interface org.springframework.session.SessionRepository<AbstractInfinispanSessionRepository.InfinispanSession>
    • deleteById

      public void deleteById(String id)
      Specified by:
      deleteById in interface org.springframework.session.SessionRepository<AbstractInfinispanSessionRepository.InfinispanSession>