Class SingleUseObjectMapStorage<K>
- java.lang.Object
-
- org.keycloak.models.map.storage.chm.ConcurrentHashMapStorage<K,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>
- Author:
- Martin Kanis
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapStorage
ConcurrentHashMapStorage.MapTaskWithValue
-
-
Field Summary
-
Fields inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapStorage
active, cloner, fieldPredicates, keyConverter, map, realmIdEntityField, rollback, tasks
-
-
Constructor Summary
Constructors Constructor Description SingleUseObjectMapStorage(CrudOperations<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 MapSingleUseObjectEntitycreate(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 Detail
-
SingleUseObjectMapStorage
public SingleUseObjectMapStorage(CrudOperations<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:MapStorageInstructs 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
Vwould 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:
createin interfaceMapStorage<MapSingleUseObjectEntity,SingleUseObjectValueModel>- Overrides:
createin classConcurrentHashMapStorage<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>- Parameters:
value- the value- Returns:
- Entity representing the
valuein the store. It may or may not be the same instance asvalue.
-
-