use of org.keycloak.models.sessions.infinispan.changes.UserSessionUpdateTask in project keycloak by keycloak.
the class UserSessionAdapter method setNote.
@Override
public void setNote(String name, String value) {
UserSessionUpdateTask task = new UserSessionUpdateTask() {
@Override
public void runUpdate(UserSessionEntity entity) {
if (value == null) {
if (entity.getNotes().containsKey(name)) {
removeNote(name);
}
return;
}
entity.getNotes().put(name, value);
}
};
update(task);
}
Aggregations