|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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)
Optimizer
generate in interface Optimizercallback - Callback to access the underlying value source.
public IntegralDataTypeHolder getLastSourceValue()
Optimizer
getLastSourceValue in interface Optimizerpublic boolean applyIncrementSizeToSourceValues()
Optimizer
applyIncrementSizeToSourceValues in interface Optimizerpublic IntegralDataTypeHolder getLastValue()
public void injectInitialValue(long initialValue)
OptimizerFactory.InitialValueAwareOptimizer
injectInitialValue in interface OptimizerFactory.InitialValueAwareOptimizerinitialValue - 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 | |||||||||