Class SingleUseObjectMapStorage<K>
java.lang.Object
org.keycloak.models.map.storage.chm.ConcurrentHashMapStorage<K,MapSingleUseObjectEntity,SingleUseObjectValueModel,CrudOperations<MapSingleUseObjectEntity,SingleUseObjectValueModel>>
org.keycloak.models.map.storage.chm.SingleUseObjectMapStorage<K>
- All Implemented Interfaces:
KeycloakTransaction
,HasRealmId
,MapStorage<MapSingleUseObjectEntity,
SingleUseObjectValueModel>
public class SingleUseObjectMapStorage<K>
extends ConcurrentHashMapStorage<K,MapSingleUseObjectEntity,SingleUseObjectValueModel,CrudOperations<MapSingleUseObjectEntity,SingleUseObjectValueModel>>
- Author:
- Martin Kanis
-
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapStorage
ConcurrentHashMapStorage.MapOperation, ConcurrentHashMapStorage.MapTaskWithValue, ConcurrentHashMapStorage.TaskKey, ConcurrentHashMapStorage.TaskMap
-
Field Summary
Fields inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapStorage
active, cloner, fieldPredicates, keyConverter, map, realmIdEntityField, rollback, tasks
-
Constructor Summary
ConstructorDescriptionSingleUseObjectMapStorage
(CrudOperations<MapSingleUseObjectEntity, SingleUseObjectValueModel> map, StringKeyConverter<K> keyConverter, DeepCloner cloner, Map<SearchableModelField<? super SingleUseObjectValueModel>, MapModelCriteriaBuilder.UpdatePredicatesFunc<K, MapSingleUseObjectEntity, SingleUseObjectValueModel>> fieldPredicates) -
Method Summary
Modifier and TypeMethodDescriptioncreate
(MapSingleUseObjectEntity value) Instructs this storage to add a new value into the underlying store on commit in the context of the current transaction.Methods inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapStorage
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.MapStorage
exists
-
Constructor Details
-
SingleUseObjectMapStorage
public SingleUseObjectMapStorage(CrudOperations<MapSingleUseObjectEntity, SingleUseObjectValueModel> map, StringKeyConverter<K> keyConverter, DeepCloner cloner, Map<SearchableModelField<? super SingleUseObjectValueModel>, MapModelCriteriaBuilder.UpdatePredicatesFunc<K, MapSingleUseObjectEntity, SingleUseObjectValueModel>> fieldPredicates)
-
-
Method Details
-
create
Description copied from interface:MapStorage
Instructs this storage to add a new value into the underlying store on commit in the context of the current transaction.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 interfaceMapStorage<MapSingleUseObjectEntity,
SingleUseObjectValueModel> - Overrides:
create
in classConcurrentHashMapStorage<K,
MapSingleUseObjectEntity, SingleUseObjectValueModel, CrudOperations<MapSingleUseObjectEntity, SingleUseObjectValueModel>> - Parameters:
value
- the value- Returns:
- Entity representing the
value
in the store. It may or may not be the same instance asvalue
.
-