|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.id.enhanced.OptimizerFactory.OptimizerSupport org.hibernate.id.enhanced.OptimizerFactory.PooledOptimizer
public static class OptimizerFactory.PooledOptimizer
Optimizer which uses a pool of values, storing the next low value of the range in the database.
Note that this optimizer works essentially the same as theOptimizerFactory.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
strategy
Field Summary |
---|
Fields inherited from class org.hibernate.id.enhanced.OptimizerFactory.OptimizerSupport |
---|
incrementSize, returnClass |
Constructor Summary | |
---|---|
OptimizerFactory.PooledOptimizer(Class returnClass,
int incrementSize)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.hibernate.id.enhanced.OptimizerFactory.OptimizerSupport |
---|
getIncrementSize, getReturnClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OptimizerFactory.PooledOptimizer(Class returnClass, int incrementSize)
Method Detail |
---|
public Serializable generate(AccessCallback callback)
generate
in interface Optimizer
callback
- Callback to access the underlying value source.
public IntegralDataTypeHolder getLastSourceValue()
getLastSourceValue
in interface Optimizer
public boolean applyIncrementSizeToSourceValues()
applyIncrementSizeToSourceValues
in interface Optimizer
public IntegralDataTypeHolder getLastValue()
public void injectInitialValue(long initialValue)
injectInitialValue
in interface OptimizerFactory.InitialValueAwareOptimizer
initialValue
- The initial value specified by the user, or -1 to indicate that the
user did not specify.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |