public static class OptimizerFactory.PooledOptimizer extends OptimizerFactory.OptimizerSupport implements OptimizerFactory.InitialValueAwareOptimizer
OptimizerFactory.HiLoOptimizer 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 OptimizerFactory.PooledLoOptimizer strategyincrementSize, returnClass| Constructor and Description |
|---|
OptimizerFactory.PooledOptimizer(Class returnClass,
int incrementSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyIncrementSizeToSourceValues()
Are increments to be applied to the values stored in the underlying
value source?
|
Serializable |
generate(AccessCallback callback)
Generate an identifier value accounting for this specific optimization.
|
IntegralDataTypeHolder |
getLastSourceValue()
A common means to access the last value obtained from the underlying
source.
|
IntegralDataTypeHolder |
getLastValue()
Getter for property 'lastValue'.
|
void |
injectInitialValue(long initialValue)
Reports the user specified initial value to the optimizer.
|
getIncrementSize, getReturnClasspublic OptimizerFactory.PooledOptimizer(Class returnClass, int incrementSize)
public Serializable generate(AccessCallback callback)
Optimizerpublic IntegralDataTypeHolder getLastSourceValue()
OptimizergetLastSourceValue in interface Optimizerpublic boolean applyIncrementSizeToSourceValues()
OptimizerapplyIncrementSizeToSourceValues in interface Optimizerpublic IntegralDataTypeHolder getLastValue()
public void injectInitialValue(long initialValue)
OptimizerFactory.InitialValueAwareOptimizerinjectInitialValue in interface OptimizerFactory.InitialValueAwareOptimizerinitialValue - The initial value specified by the user, or -1 to indicate that the
user did not specify.Copyright © 2018 JBoss by Red Hat. All rights reserved.