Interface SessionManager<L,​B extends Batch>

    • Method Detail

      • findSession

        Session<L> findSession​(String id)
        Returns the session with the specified identifier, or null if none exists. Sessions returned by this method must be closed via Session.close(). This method is intended to be invoked within the context of a batch.
        Parameters:
        id - a session identifier
        Returns:
        an existing web session, or null if none exists
      • createSession

        Session<L> createSession​(String id)
        Creates a session using the specified identifier. Sessions returned by this method must be closed via Session.close(). This method is intended to be invoked within the context of a batch.
        Parameters:
        id - a session identifier
        Returns:
        a new web session, or null if a session with the specified identifier already exists.
      • getBatcher

        Batcher<B> getBatcher()
        Exposes the batching mechanism used by this session manager.
        Returns:
        a batcher.
      • getActiveSessions

        Set<String> getActiveSessions()
        Returns the identifiers of those sessions that are active on this node.
        Returns:
        a set of session identifiers.
      • getLocalSessions

        Set<String> getLocalSessions()
        Returns the identifiers of all sessions on this node, including both active and passive sessions.
        Returns:
        a set of session identifiers.
      • readSession

        ImmutableSession readSession​(String id)
        Returns a read-only view of the session with the specified identifier. This method is intended to be invoked within the context of a batch
        Parameters:
        id - a unique session identifier
        Returns:
        a read-only session or null if none exists
      • getStopTimeout

        Duration getStopTimeout()
        The maximum duration of time to wait for the completion of requests before the session manager can be stopped.
        Returns:
        a duration
      • getIdentifierFactory

        Supplier<String> getIdentifierFactory()
        Returns the identifier factory of this session manager.
        Returns:
        an identifier factory