Package io.jmix.data.impl
Class NumberIdCache
java.lang.Object
io.jmix.data.impl.NumberIdCache
Intermediate cache for generated ids of entities with long/integer PK.
The cache size is determined by the
jmix.data.numberIdCacheSize property.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConcurrentMap<String,NumberIdCache.Generator> protected DataPropertiesprotected Metadataprotected NumberIdWorker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLongId(String entityName) Generates next id.protected StringgetCacheKey(String entityName, String sequenceName) protected NumberIdCache.SequenceParamsgetSequenceParams(MetaClass metaClass) voidreset()INTERNAL.
-
Field Details
-
metadata
-
numberIdWorker
-
dataProperties
-
cache
-
-
Constructor Details
-
NumberIdCache
public NumberIdCache()
-
-
Method Details
-
createLongId
Generates next id.- Parameters:
entityName- entity name- Returns:
- next id
-
getSequenceParams
-
reset
public void reset()INTERNAL. Used by tests. -
getCacheKey
-