Class DistributableSession

java.lang.Object
org.wildfly.clustering.spring.session.DistributableSession
All Implemented Interfaces:
AutoCloseable, org.springframework.session.Session, SpringSession

public class DistributableSession extends Object implements SpringSession
Spring Session implementation that delegates to a Session instance.
Author:
Paul Ferraro
  • Constructor Details

    • DistributableSession

      public DistributableSession(org.wildfly.clustering.session.SessionManager<Void> manager, org.wildfly.clustering.session.Session<Void> session, org.wildfly.clustering.cache.batch.SuspendedBatch batch, UserConfiguration indexing, BiConsumer<org.wildfly.clustering.session.ImmutableSession,BiFunction<Object,org.springframework.session.Session,org.springframework.context.ApplicationEvent>> destroyAction)
  • Method Details

    • changeSessionId

      public String changeSessionId()
      Specified by:
      changeSessionId in interface org.springframework.session.Session
    • getAttribute

      public <T> T getAttribute(String name)
      Specified by:
      getAttribute in interface org.springframework.session.Session
    • getAttributeNames

      public Set<String> getAttributeNames()
      Specified by:
      getAttributeNames in interface org.springframework.session.Session
    • getCreationTime

      public Instant getCreationTime()
      Specified by:
      getCreationTime in interface org.springframework.session.Session
    • getId

      public String getId()
      Specified by:
      getId in interface org.springframework.session.Session
    • getLastAccessedTime

      public Instant getLastAccessedTime()
      Specified by:
      getLastAccessedTime in interface org.springframework.session.Session
    • getMaxInactiveInterval

      public Duration getMaxInactiveInterval()
      Specified by:
      getMaxInactiveInterval in interface org.springframework.session.Session
    • isExpired

      public boolean isExpired()
      Specified by:
      isExpired in interface org.springframework.session.Session
    • removeAttribute

      public void removeAttribute(String name)
      Specified by:
      removeAttribute in interface org.springframework.session.Session
    • setAttribute

      public void setAttribute(String name, Object value)
      Specified by:
      setAttribute in interface org.springframework.session.Session
    • setLastAccessedTime

      public void setLastAccessedTime(Instant instant)
      Specified by:
      setLastAccessedTime in interface org.springframework.session.Session
    • setMaxInactiveInterval

      public void setMaxInactiveInterval(Duration duration)
      Specified by:
      setMaxInactiveInterval in interface org.springframework.session.Session
    • isNew

      public boolean isNew()
      Description copied from interface: SpringSession
      Indicates whether this session was created during the current request.
      Specified by:
      isNew in interface SpringSession
      Returns:
      true, if this session was newly created, false otherwise.
    • invalidate

      public void invalidate()
      Description copied from interface: SpringSession
      Invalidates this session.
      Specified by:
      invalidate in interface SpringSession
    • close

      public void close()
      Description copied from interface: SpringSession
      To be invoked by SessionRepository.save(Session).
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SpringSession