org.keycloak.models.sessions.infinispan.entities

## Class SessionEntity

- java.lang.Object
- - org.keycloak.models.sessions.infinispan.entities.SessionEntity

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    AuthenticatedClientSessionEntity, InitializerState, LoginFailureEntity, RootAuthenticationSessionEntity, UserSessionEntity

      public abstract class SessionEntity
      extends Object
      implements Serializable

  Represents an entity containing data about a session, i.e. an object that is stored in infinispan cache and can be potentially shared across DCs. Due to conflict management in `RemoteCacheInvoker` and `InfinispanChangelogBasedTransaction` that use Infinispan's `replace()` method, overriding `hashCode()` and `equals(java.lang.Object)` is mandatory in descendants.
  Author:
    Stian Thorgersen
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `SessionEntity()`
    `protected` | `SessionEntity(String realmId)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `equals(Object obj)`
    `String` | `getRealmId()` Returns realmId ID.
    `abstract int` | `hashCode()`
    `SessionEntityWrapper` | `mergeRemoteEntityWithLocalEntity(SessionEntityWrapper localEntityWrapper)`
    `void` | `setRealmId(String realmId)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SessionEntity

          public SessionEntity()

    - #### SessionEntity

          protected SessionEntity(String realmId)

  - ### Method Detail

    - #### getRealmId

          public String getRealmId()

      Returns realmId ID.
      Returns:

    - #### setRealmId

          public void setRealmId(String realmId)

    - #### mergeRemoteEntityWithLocalEntity

          public SessionEntityWrapper mergeRemoteEntityWithLocalEntity(SessionEntityWrapper localEntityWrapper)

    - #### equals

          public abstract boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public abstract int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2020 JBoss by Red Hat. All rights reserved.