Note that this optimizer works essentially the same as the
org. except that here the bucket ranges are actually
encoded into the database structures.
Note if you prefer that the database value be interpreted as the bottom end of our current range,
then use the PooledLoOptimizer strategy
PooledLoOptimizer
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private static final CoreMessageLogger | |
| private PooledOptimizer. | |
| private Map |
| Access | Constructor and Description |
|---|---|
| public | PooledOptimizer(Class<T>
The Java type of the values to be generated returnClass, int The increment size. incrementSize)Constructs a PooledOptimizer |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | applyIncrementSizeToSourceValues()
Implements org. |
| public synchronized Serializable | generate(AccessCallback
Callback to access the underlying value source. callback)Implements org. |
| public IntegralDataTypeHolder | getLastSourceValue()
Implements org. |
| public IntegralDataTypeHolder | |
| public void | injectInitialValue(long
The initial value specified by the user, or -1 to indicate that the
user did not specify. initialValue)Implements org. |
| private PooledOptimizer. | |
| private PooledOptimizer. |
| initialValue | back to summary |
|---|---|
| private long initialValue | |
| log | back to summary |
|---|---|
| private static final CoreMessageLogger log | |
| noTenantState | back to summary |
|---|---|
| private PooledOptimizer. | |
| tenantSpecificState | back to summary |
|---|---|
| private Map<String, PooledOptimizer. | |
| PooledOptimizer | back to summary |
|---|---|
| public PooledOptimizer(Class<T> returnClass, int incrementSize) Constructs a PooledOptimizer
| |
| 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?
| |
| generate | back to summary |
|---|---|
| public synchronized 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.
| |
| injectInitialValue | back to summary |
|---|---|
| public void injectInitialValue(long initialValue) Implements org. Doc from org. Reports the user specified initial value to the optimizer. -1 is used to indicate that the user did not specify.
| |
| locateGenerationState | back to summary |
|---|---|
| private PooledOptimizer. | |
| noTenantGenerationState | back to summary |
|---|---|
| private PooledOptimizer. | |
| Modifier and Type | Field and Description |
|---|---|
| private IntegralDataTypeHolder | |
| private IntegralDataTypeHolder |
| Access | Constructor and Description |
|---|---|
| private |
| hiValue | back to summary |
|---|---|
| private IntegralDataTypeHolder hiValue | |
| value | back to summary |
|---|---|
| private IntegralDataTypeHolder value | |
| GenerationState | back to summary |
|---|---|
| private GenerationState() | |