Class InfinispanSessionDataStore

  • All Implemented Interfaces:
    org.eclipse.jetty.server.session.SessionDataMap, org.eclipse.jetty.server.session.SessionDataStore, org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.LifeCycle

    @ManagedObject
    public class InfinispanSessionDataStore
    extends org.eclipse.jetty.server.session.AbstractSessionDataStore
    InfinispanSessionDataStore
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

        org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

        org.eclipse.jetty.util.component.LifeCycle.Listener
    • Field Summary

      • Fields inherited from class org.eclipse.jetty.server.session.AbstractSessionDataStore

        _context, _gracePeriodSec, _lastExpiryCheckTime, _savePeriodSec
      • Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
      • Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

        KEY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean delete​(java.lang.String id)  
      java.util.Set<java.lang.String> doGetExpired​(java.util.Set<java.lang.String> candidates)  
      org.eclipse.jetty.server.session.SessionData doLoad​(java.lang.String id)  
      protected void doStart()  
      void doStore​(java.lang.String id, org.eclipse.jetty.server.session.SessionData data, long lastSaveTime)  
      boolean exists​(java.lang.String id)  
      org.infinispan.commons.api.BasicCache<java.lang.String,​java.lang.Object> getCache()
      Get the clustered cache instance.
      java.lang.String getCacheKey​(java.lang.String id)  
      int getInfinispanIdleTimeoutSec()  
      boolean isPassivating()  
      org.eclipse.jetty.server.session.SessionData newSessionData​(java.lang.String id, long created, long accessed, long lastAccessed, long maxInactiveMs)  
      void setCache​(org.infinispan.commons.api.BasicCache<java.lang.String,​java.lang.Object> cache)
      Set the clustered cache instance.
      void setInfinispanIdleTimeoutSec​(int sec)  
      java.lang.String toString()  
      • Methods inherited from class org.eclipse.jetty.server.session.AbstractSessionDataStore

        checkStarted, getExpired, getGracePeriodSec, getSavePeriodSec, initialize, load, setGracePeriodSec, setSavePeriodSec, store
      • Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle

        addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
      • Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.jetty.util.component.Dumpable

        dumpSelf
      • Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle

        addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
    • Constructor Detail

      • InfinispanSessionDataStore

        public InfinispanSessionDataStore()
    • Method Detail

      • getCache

        public org.infinispan.commons.api.BasicCache<java.lang.String,​java.lang.Object> getCache()
        Get the clustered cache instance.
        Returns:
        the cache
      • setCache

        public void setCache​(org.infinispan.commons.api.BasicCache<java.lang.String,​java.lang.Object> cache)
        Set the clustered cache instance.
        Parameters:
        cache - the cache
      • doStart

        protected void doStart()
                        throws java.lang.Exception
        Overrides:
        doStart in class org.eclipse.jetty.server.session.AbstractSessionDataStore
        Throws:
        java.lang.Exception
      • doLoad

        public org.eclipse.jetty.server.session.SessionData doLoad​(java.lang.String id)
                                                            throws java.lang.Exception
        Specified by:
        doLoad in class org.eclipse.jetty.server.session.AbstractSessionDataStore
        Throws:
        java.lang.Exception
      • delete

        public boolean delete​(java.lang.String id)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • doGetExpired

        public java.util.Set<java.lang.String> doGetExpired​(java.util.Set<java.lang.String> candidates)
        Specified by:
        doGetExpired in class org.eclipse.jetty.server.session.AbstractSessionDataStore
      • doStore

        public void doStore​(java.lang.String id,
                            org.eclipse.jetty.server.session.SessionData data,
                            long lastSaveTime)
                     throws java.lang.Exception
        Specified by:
        doStore in class org.eclipse.jetty.server.session.AbstractSessionDataStore
        Throws:
        java.lang.Exception
      • getCacheKey

        public java.lang.String getCacheKey​(java.lang.String id)
      • isPassivating

        @ManagedAttribute(value="does store serialize sessions",
                          readonly=true)
        public boolean isPassivating()
      • exists

        public boolean exists​(java.lang.String id)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • newSessionData

        public org.eclipse.jetty.server.session.SessionData newSessionData​(java.lang.String id,
                                                                           long created,
                                                                           long accessed,
                                                                           long lastAccessed,
                                                                           long maxInactiveMs)
        Specified by:
        newSessionData in interface org.eclipse.jetty.server.session.SessionDataStore
        Overrides:
        newSessionData in class org.eclipse.jetty.server.session.AbstractSessionDataStore
      • setInfinispanIdleTimeoutSec

        public void setInfinispanIdleTimeoutSec​(int sec)
        Parameters:
        sec - the infinispan-specific idle timeout in sec or 0 if not set
      • getInfinispanIdleTimeoutSec

        @ManagedAttribute(value="infinispan idle timeout sec",
                          readonly=true)
        public int getInfinispanIdleTimeoutSec()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.eclipse.jetty.server.session.AbstractSessionDataStore