Class SingleUseObjectConcurrentHashMapStorage<K,V extends AbstractEntity,M>
- java.lang.Object
- 
- org.keycloak.models.map.storage.chm.ConcurrentHashMapStorage<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
- 
- org.keycloak.models.map.storage.chm.SingleUseObjectConcurrentHashMapStorage<K,V,M>
 
 
- 
- All Implemented Interfaces:
- ConcurrentHashMapCrudOperations<MapSingleUseObjectEntity,SingleUseObjectValueModel>,- MapStorage<MapSingleUseObjectEntity,SingleUseObjectValueModel>
 
 public class SingleUseObjectConcurrentHashMapStorage<K,V extends AbstractEntity,M> extends ConcurrentHashMapStorage<K,MapSingleUseObjectEntity,SingleUseObjectValueModel> - Author:
- Martin Kanis
 
- 
- 
Field Summary- 
Fields inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapStoragecloner, fieldPredicates, keyConverter, store
 
- 
 - 
Constructor SummaryConstructors Constructor Description SingleUseObjectConcurrentHashMapStorage(StringKeyConverter<K> keyConverter, DeepCloner cloner)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description MapSingleUseObjectEntitycreate(MapSingleUseObjectEntity value)Creates an object in the store.MapKeycloakTransaction<MapSingleUseObjectEntity,SingleUseObjectValueModel>createTransaction(KeycloakSession session)Creates aMapKeycloakTransactionobject that tracks a new transaction related to this storage.Stream<MapSingleUseObjectEntity>read(QueryParameters<SingleUseObjectValueModel> queryParameters)Returns stream of objects satisfying givencriteriafrom the storage.- 
Methods inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapStoragecreateCriteriaBuilder, delete, delete, getCount, getKeyConverter, read, update
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.keycloak.models.map.storage.chm.ConcurrentHashMapCrudOperationsdetermineKeyFromValue, exists, exists
 
- 
 
- 
- 
- 
Constructor Detail- 
SingleUseObjectConcurrentHashMapStoragepublic SingleUseObjectConcurrentHashMapStorage(StringKeyConverter<K> keyConverter, DeepCloner cloner) 
 
- 
 - 
Method Detail- 
createTransactionpublic MapKeycloakTransaction<MapSingleUseObjectEntity,SingleUseObjectValueModel> createTransaction(KeycloakSession session) Description copied from interface:MapStorageCreates aMapKeycloakTransactionobject that tracks a new transaction related to this storage. In case of JPA or similar, the transaction object might be supplied by the container (via JTA) or shared same across storages accessing the same database within the same session; in other cases (e.g. plain map) a separate transaction handler might be created per each storage.- Specified by:
- createTransactionin interface- MapStorage<K,V extends AbstractEntity>
- Overrides:
- createTransactionin class- ConcurrentHashMapStorage<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
- Returns:
- See description. Never returns null
 
 - 
createpublic MapSingleUseObjectEntity create(MapSingleUseObjectEntity value) Description copied from interface:ConcurrentHashMapCrudOperationsCreates an object in the store. ID of thevaluemay be prescribed in id of thevalue. If the id isnullor its format is not matching the store internal format for ID, then thevalue's ID will be generated and returned in the id of the return value.- Specified by:
- createin interface- ConcurrentHashMapCrudOperations<K,V extends AbstractEntity>
- Overrides:
- createin class- ConcurrentHashMapStorage<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
- Parameters:
- value- Entity to create in the store
- Returns:
- Entity representing the valuein the store. It may or may not be the same instance asvalue
- See Also:
- AbstractEntity.getId()
 
 - 
readpublic Stream<MapSingleUseObjectEntity> read(QueryParameters<SingleUseObjectValueModel> queryParameters) Description copied from interface:ConcurrentHashMapCrudOperationsReturns stream of objects satisfying givencriteriafrom the storage. The criteria are specified in the given criteria builder based on model properties. IfVimplementsExpirableEntitythis method should not return entities that are expired. SeeExpirableEntityJavaDoc for more details.- Specified by:
- readin interface- ConcurrentHashMapCrudOperations<K,V extends AbstractEntity>
- Overrides:
- readin class- ConcurrentHashMapStorage<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
- Parameters:
- queryParameters- parameters for the query like firstResult, maxResult, requested ordering, etc.
- Returns:
- Stream of objects. Never returns null.
 
 
- 
 
-