Interface SessionDataStore

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean exists​(java.lang.String id)
      Test if data exists for a given session id.
      java.util.Set<java.lang.String> getExpired​(java.util.Set<java.lang.String> candidates)
      Called periodically, this method should search the data store for sessions that have been expired for a 'reasonable' amount of time.
      boolean isPassivating()
      True if this type of datastore will passivate session objects
      SessionData newSessionData​(java.lang.String id, long created, long accessed, long lastAccessed, long maxInactiveMs)
      Create a new SessionData
      • Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle

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

      • newSessionData

        SessionData newSessionData​(java.lang.String id,
                                   long created,
                                   long accessed,
                                   long lastAccessed,
                                   long maxInactiveMs)
        Create a new SessionData
        Parameters:
        id - the id
        created - the timestamp when created
        accessed - the timestamp when accessed
        lastAccessed - the timestamp when last accessed
        maxInactiveMs - the max inactive time in milliseconds
        Returns:
        a new SessionData object
      • getExpired

        java.util.Set<java.lang.String> getExpired​(java.util.Set<java.lang.String> candidates)
        Called periodically, this method should search the data store for sessions that have been expired for a 'reasonable' amount of time.
        Parameters:
        candidates - if provided, these are keys of sessions that the SessionDataStore thinks has expired and should be verified by the SessionDataStore
        Returns:
        set of session ids
      • isPassivating

        boolean isPassivating()
        True if this type of datastore will passivate session objects
        Returns:
        true if this store can passivate sessions, false otherwise
      • exists

        boolean exists​(java.lang.String id)
                throws java.lang.Exception
        Test if data exists for a given session id.
        Parameters:
        id - Identity of session whose existence should be checked
        Returns:
        true if valid, non-expired session exists
        Throws:
        java.lang.Exception - if problem checking existence with persistence layer