HiLoOptimizer, maintaining compatibility with the values generated by the
legacy Hibernate hilo based generators.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final Lock | lock
Use a lock instead of the monitor lock to avoid pinning when using virtual threads. |
| private static final Logger | |
| private LegacyHiLoAlgorithmOptimizer. | |
| private Map |
| Access | Constructor and Description |
|---|---|
| public | LegacyHiLoAlgorithmOptimizer(Class<?>
The Java type of the values to be generated returnClass, int The increment size. incrementSize)Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | applyIncrementSizeToSourceValues()
Implements org. |
| private LegacyHiLoAlgorithmOptimizer. | |
| public Serializable | generate(AccessCallback
Callback to access the underlying value source. callback)Implements org. |
| public IntegralDataTypeHolder | getLastSourceValue()
Implements org. |
| public IntegralDataTypeHolder | |
| private LegacyHiLoAlgorithmOptimizer. | |
| private LegacyHiLoAlgorithmOptimizer. |
| initialMaxLo | back to summary |
|---|---|
| private final long initialMaxLo | |
| lock | back to summary |
|---|---|
| private final Lock lock Use a lock instead of the monitor lock to avoid pinning when using virtual threads. | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| noTenantState | back to summary |
|---|---|
| private LegacyHiLoAlgorithmOptimizer. | |
| tenantSpecificState | back to summary |
|---|---|
| private Map<String, LegacyHiLoAlgorithmOptimizer. | |
| LegacyHiLoAlgorithmOptimizer | back to summary |
|---|---|
| public LegacyHiLoAlgorithmOptimizer(Class<?> returnClass, int incrementSize) Constructs a
| |
| applyIncrementSizeToSourceValues | back to summary |
|---|---|
| public boolean applyIncrementSizeToSourceValues() Implements org. Doc from org. Are increments to be applied to the values stored in the underlying value source?
| |
| createGenerationState | back to summary |
|---|---|
| private LegacyHiLoAlgorithmOptimizer. | |
| generate | back to summary |
|---|---|
| public Serializable generate(AccessCallback callback) Implements org. Doc from org. Generate an identifier value accounting for this specific optimization. All known implementors are synchronized. Consider carefully if a new implementation could drop this requirement.
| |
| getLastSourceValue | back to summary |
|---|---|
| public IntegralDataTypeHolder getLastSourceValue() Implements org. Doc from org. A common means to access the last value obtained from the underlying source. This is intended for testing purposes, since accessing the underlying database source directly is much more difficult.
| |
| getLastValue | back to summary |
|---|---|
| public IntegralDataTypeHolder getLastValue() Getter for property 'lastValue'. Exposure intended for testing purposes.
| |
| locateGenerationState | back to summary |
|---|---|
| private LegacyHiLoAlgorithmOptimizer. | |
| noTenantGenerationState | back to summary |
|---|---|
| private LegacyHiLoAlgorithmOptimizer. | |
| Modifier and Type | Field and Description |
|---|---|
| private IntegralDataTypeHolder | |
| private IntegralDataTypeHolder | |
| private long | |
| private long | |
| private IntegralDataTypeHolder |
| Access | Constructor and Description |
|---|---|
| private |
| hi | back to summary |
|---|---|
| private IntegralDataTypeHolder hi | |
| lastSourceValue | back to summary |
|---|---|
| private IntegralDataTypeHolder lastSourceValue | |
| lo | back to summary |
|---|---|
| private long lo | |
| maxLo | back to summary |
|---|---|
| private long maxLo | |
| value | back to summary |
|---|---|
| private IntegralDataTypeHolder value | |
| GenerationState | back to summary |
|---|---|
| private GenerationState() | |