Class SessionEntityWrapper<S extends SessionEntity>

java.lang.Object
org.keycloak.models.sessions.infinispan.changes.SessionEntityWrapper<S>

@ProtoTypeId(65555) public class SessionEntityWrapper<S extends SessionEntity> extends Object
Author:
Marek Posolda
  • Field Details

    • TOMBSTONE_MARKER_LIFESPAN_MS

      public static final long TOMBSTONE_MARKER_LIFESPAN_MS
      Short lifespan for the tombstone marker itself, as a safety net: SessionResurrectionGuardListener removes the marker as soon as it observes it, so this expiry should normally never be reached; it only guards against that removal not happening for any reason.
      See Also:
  • Constructor Details

    • SessionEntityWrapper

      protected SessionEntityWrapper(UUID version, Map<String,String> localMetadata, S entity)
    • SessionEntityWrapper

      public SessionEntityWrapper(Map<String,String> localMetadata, S entity)
    • SessionEntityWrapper

      public SessionEntityWrapper(S entity)
  • Method Details

    • forTransport

      public static <S extends SessionEntity> SessionEntityWrapper<S> forTransport(S entity)
    • forTransport

      public SessionEntityWrapper<S> forTransport()
    • getVersion

      @ProtoField(1) public UUID getVersion()
    • getEntity

      public S getEntity()
    • getLocalMetadata

      @ProtoField(value=3, mapImplementation=java.util.concurrent.ConcurrentHashMap.class) public Map<String,String> getLocalMetadata()
    • isTombstoneMarker

      public boolean isTombstoneMarker()
      Whether this wrapper is a short-lived tombstone marker, written by InfinispanChangesUtils in place of a bare remove() so that SessionResurrectionGuardListener observes a create/modify notification for every deletion (see that class for details). The wrapped entity, if any, is not meaningful in this case and must not be treated as real session state.
    • createTombstoneMarker

      public static <S extends SessionEntity> SessionEntityWrapper<S> createTombstoneMarker(S removedEntity)
      Creates a tombstone marker wrapping the given (already removed) entity purely for transport/marshalling purposes; see isTombstoneMarker().
    • getClientIfNeeded

      public ClientModel getClientIfNeeded(RealmModel realm)
    • getLocalMetadataNote

      public String getLocalMetadataNote(String key)
    • getLocalMetadataNoteInt

      public Integer getLocalMetadataNoteInt(String key)
    • putLocalMetadataNoteInt

      public void putLocalMetadataNoteInt(String key, int value)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object