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, getReturnClass
public OptimizerFactory.PooledOptimizer(Class returnClass, int incrementSize)
public Serializable generate(AccessCallback callback)
Optimizer
public IntegralDataTypeHolder getLastSourceValue()
Optimizer
getLastSourceValue
in interface Optimizer
public boolean applyIncrementSizeToSourceValues()
Optimizer
applyIncrementSizeToSourceValues
in interface Optimizer
public IntegralDataTypeHolder getLastValue()
public void injectInitialValue(long initialValue)
OptimizerFactory.InitialValueAwareOptimizer
injectInitialValue
in interface OptimizerFactory.InitialValueAwareOptimizer
initialValue
- The initial value specified by the user, or -1 to indicate that the
user did not specify.Copyright © 2001-2013 Red Hat, Inc. All Rights Reserved.