Class MutableUserSessions<D,S>

java.lang.Object
org.wildfly.clustering.session.cache.user.MutableUserSessions<D,S>
Type Parameters:
D - the deployment type
S - the session type
All Implemented Interfaces:
UserSessions<D,S>

public class MutableUserSessions<D,S> extends Object implements UserSessions<D,S>
A mutable user sessions implementation.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addSession(D deployment, S session)
    Adds the specified deployment and session identifiers to the set of deployments for which the associated user is authenticated.
    Returns the set of deployments for which the associated user is authenticated.
    getSession(D deployment)
    Returns the corresponding session identifier for the specified deployment.
    removeSession(D deployment)
    Removes the specified deployment from the set of deployments for which the associated user is authenticated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getDeployments

      public Set<D> getDeployments()
      Description copied from interface: UserSessions
      Returns the set of deployments for which the associated user is authenticated.
      Specified by:
      getDeployments in interface UserSessions<D,S>
      Returns:
      a set of deployment identifiers.
    • getSession

      public S getSession(D deployment)
      Description copied from interface: UserSessions
      Returns the corresponding session identifier for the specified deployment.
      Specified by:
      getSession in interface UserSessions<D,S>
      Parameters:
      deployment - a deployment identifier
      Returns:
      the session identifier of the user for the specified deployment, or null, if no session exists for the associated user.
    • removeSession

      public S removeSession(D deployment)
      Description copied from interface: UserSessions
      Removes the specified deployment from the set of deployments for which the associated user is authenticated.
      Specified by:
      removeSession in interface UserSessions<D,S>
      Parameters:
      deployment - a deployment identifier
      Returns:
      the session identifier of the user for the specified deployment, or null, if no session exists for the associated user.
    • addSession

      public boolean addSession(D deployment, S session)
      Description copied from interface: UserSessions
      Adds the specified deployment and session identifiers to the set of deployments for which the associated user is authenticated.
      Specified by:
      addSession in interface UserSessions<D,S>
      Parameters:
      deployment - a deployment identifier
      session - a session identifier
      Returns:
      true, if the session was added, false it already exists