Class SingleUseObjectConcurrentHashMapCrudOperations<K,V extends AbstractEntity,M>
- java.lang.Object
-
- org.keycloak.models.map.storage.chm.ConcurrentHashMapCrudOperations<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
-
- org.keycloak.models.map.storage.chm.SingleUseObjectConcurrentHashMapCrudOperations<K,V,M>
-
- All Implemented Interfaces:
CrudOperations<MapSingleUseObjectEntity,SingleUseObjectValueModel>
public class SingleUseObjectConcurrentHashMapCrudOperations<K,V extends AbstractEntity,M> extends ConcurrentHashMapCrudOperations<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
- Author:
- Martin Kanis
-
-
Field Summary
-
Fields inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapCrudOperations
cloner, fieldPredicates, keyConverter, store
-
-
Constructor Summary
Constructors Constructor Description SingleUseObjectConcurrentHashMapCrudOperations(StringKeyConverter<K> keyConverter, DeepCloner cloner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MapSingleUseObjectEntity
create(MapSingleUseObjectEntity value)
Creates an object in the storage.Stream<MapSingleUseObjectEntity>
read(QueryParameters<SingleUseObjectValueModel> queryParameters)
Returns stream of objects satisfying givencriteria
from the storage.-
Methods inherited from class org.keycloak.models.map.storage.chm.ConcurrentHashMapCrudOperations
createCriteriaBuilder, delete, delete, getCount, getKeyConverter, read, update
-
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.CrudOperations
determineKeyFromValue, exists, exists
-
-
-
-
Constructor Detail
-
SingleUseObjectConcurrentHashMapCrudOperations
public SingleUseObjectConcurrentHashMapCrudOperations(StringKeyConverter<K> keyConverter, DeepCloner cloner)
-
-
Method Detail
-
create
public MapSingleUseObjectEntity create(MapSingleUseObjectEntity value)
Description copied from interface:CrudOperations
Creates an object in the storage.
ID of thevalue
may be prescribed in id of thevalue
. If the id isnull
or 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:
create
in interfaceCrudOperations<K,V extends AbstractEntity>
- Overrides:
create
in classConcurrentHashMapCrudOperations<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
- Parameters:
value
- Entity to create in the store- Returns:
- Entity representing the
value
in the store. It may or may not be the same instance asvalue
- See Also:
AbstractEntity.getId()
-
read
public Stream<MapSingleUseObjectEntity> read(QueryParameters<SingleUseObjectValueModel> queryParameters)
Description copied from interface:CrudOperations
Returns stream of objects satisfying givencriteria
from the storage. The criteria are specified in the given criteria builder based on model properties.
IfV
implementsExpirableEntity
this method should not return entities that are expired. SeeExpirableEntity
JavaDoc for more details.- Specified by:
read
in interfaceCrudOperations<K,V extends AbstractEntity>
- Overrides:
read
in classConcurrentHashMapCrudOperations<K,MapSingleUseObjectEntity,SingleUseObjectValueModel>
- Parameters:
queryParameters
- parameters for the query like firstResult, maxResult, requested ordering, etc.- Returns:
- Stream of objects. Never returns
null
.
-
-