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
Modifier and TypeClassDescriptionprotected class
protected static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected ConcurrentMap<String,
NumberIdCache.Generator> protected DataProperties
protected Metadata
protected NumberIdWorker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateLongId
(String entityName) Generates next id.protected String
getCacheKey
(String entityName, String sequenceName) protected NumberIdCache.SequenceParams
getSequenceParams
(MetaClass metaClass) void
reset()
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
-