Class SessionEntityWrapper<S extends SessionEntity>
java.lang.Object
org.keycloak.models.sessions.infinispan.changes.SessionEntityWrapper<S>
- Author:
- Marek Posolda
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longShort lifespan for the tombstone marker itself, as a safety net:SessionResurrectionGuardListenerremoves 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. -
Constructor Summary
ConstructorsModifierConstructorDescriptionSessionEntityWrapper(Map<String, String> localMetadata, S entity) protectedSessionEntityWrapper(S entity) -
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends SessionEntity>
SessionEntityWrapper<S>createTombstoneMarker(S removedEntity) Creates a tombstone marker wrapping the given (already removed) entity purely for transport/marshalling purposes; seeisTombstoneMarker().booleanstatic <S extends SessionEntity>
SessionEntityWrapper<S>forTransport(S entity) getClientIfNeeded(RealmModel realm) inthashCode()booleanWhether this wrapper is a short-lived tombstone marker, written byInfinispanChangesUtilsin place of a bareremove()so thatSessionResurrectionGuardListenerobserves a create/modify notification for every deletion (see that class for details).voidputLocalMetadataNoteInt(String key, int value) toString()
-
Field Details
-
TOMBSTONE_MARKER_LIFESPAN_MS
public static final long TOMBSTONE_MARKER_LIFESPAN_MSShort lifespan for the tombstone marker itself, as a safety net:SessionResurrectionGuardListenerremoves 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
-
SessionEntityWrapper
-
SessionEntityWrapper
-
-
Method Details
-
forTransport
-
forTransport
-
getVersion
-
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 byInfinispanChangesUtilsin place of a bareremove()so thatSessionResurrectionGuardListenerobserves 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; seeisTombstoneMarker(). -
getClientIfNeeded
-
getLocalMetadataNote
-
getLocalMetadataNoteInt
-
putLocalMetadataNoteInt
-
equals
-
hashCode
public int hashCode() -
toString
-