Class SingleUseObjectKeycloakTransaction<K>
- java.lang.Object
-
- org.keycloak.models.map.storage.chm.ConcurrentHashMapKeycloakTransaction<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
-
- org.keycloak.models.map.storage.chm.SingleUseObjectKeycloakTransaction<K>
-
- All Implemented Interfaces:
KeycloakTransaction
,HasRealmId
,MapKeycloakTransaction<MapSingleUseObjectEntity,SingleUseObjectValueModel>
public class SingleUseObjectKeycloakTransaction<K> extends ConcurrentHashMapKeycloakTransaction<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
- Author:
- Martin Kanis
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapKeycloakTransaction
ConcurrentHashMapKeycloakTransaction.MapTaskWithValue
-
-
Field Summary
-
Fields inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapKeycloakTransaction
active, cloner, fieldPredicates, keyConverter, map, realmIdEntityField, rollback, tasks
-
-
Constructor Summary
Constructors Constructor Description SingleUseObjectKeycloakTransaction(ConcurrentHashMapCrudOperations<MapSingleUseObjectEntity,SingleUseObjectValueModel> map, StringKeyConverter<K> keyConverter, DeepCloner cloner, Map<SearchableModelField<? super SingleUseObjectValueModel>,MapModelCriteriaBuilder.UpdatePredicatesFunc<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>> fieldPredicates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MapSingleUseObjectEntity
create(MapSingleUseObjectEntity value)
Instructs this transaction to add a new value into the underlying store on commit.-
Methods inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapKeycloakTransaction
addTask, begin, commit, delete, delete, exists, getCount, getRealmId, getRollbackOnly, isActive, read, read, registerEntityForChanges, rollback, setRealmId, setRollbackOnly, updateIfChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.map.storage.MapKeycloakTransaction
exists
-
-
-
-
Constructor Detail
-
SingleUseObjectKeycloakTransaction
public SingleUseObjectKeycloakTransaction(ConcurrentHashMapCrudOperations<MapSingleUseObjectEntity,SingleUseObjectValueModel> map, StringKeyConverter<K> keyConverter, DeepCloner cloner, Map<SearchableModelField<? super SingleUseObjectValueModel>,MapModelCriteriaBuilder.UpdatePredicatesFunc<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>> fieldPredicates)
-
-
Method Detail
-
create
public MapSingleUseObjectEntity create(MapSingleUseObjectEntity value)
Description copied from interface:MapKeycloakTransaction
Instructs this transaction to add a new value into the underlying store on commit.Updates to the returned instances of
V
would be visible in the current transaction and will propagate into the underlying store upon commit. The ID of the entity passed in the parameter might change to a different value in the returned value if the underlying storage decided this was necessary. If the ID of the entity was null before, it will be set on the returned value.- Specified by:
create
in interfaceMapKeycloakTransaction<MapSingleUseObjectEntity,SingleUseObjectValueModel>
- Overrides:
create
in classConcurrentHashMapKeycloakTransaction<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
- Parameters:
value
- the value- Returns:
- Entity representing the
value
in the store. It may or may not be the same instance asvalue
.
-
-