Package org.hibernate.id.enhanced
Class OptimizerFactory
java.lang.Object
org.hibernate.id.enhanced.OptimizerFactory
Factory for
Optimizer instances.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOptimizer which applies a 'hilo' algorithm in memory to achieve optimization.static interfaceMarker interface for optimizer which wish to know the user-specified initial value.static classstatic classAn optimizer that performs no optimization.static classCommon support for optimizer implementations.static classstatic classOptimizer which uses a pool of values, storing the next low value of the range in the database.static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OptimizerbuildOptimizer(String type, Class returnClass, int incrementSize) Deprecated.static OptimizerbuildOptimizer(String type, Class returnClass, int incrementSize, long explicitInitialValue) Builds an optimizerstatic booleanisPooledOptimizer(String type)
-
Constructor Details
-
OptimizerFactory
public OptimizerFactory()
-
-
Method Details
-
isPooledOptimizer
-
buildOptimizer
Deprecated.UsebuildOptimizer(String, Class, int, long)insteadBuilds an optimizer- Parameters:
type- The optimizer type, either a short-hand name or theOptimizerclass name.returnClass- The generated value java typeincrementSize- The increment size.- Returns:
- The built optimizer
-
buildOptimizer
public static Optimizer buildOptimizer(String type, Class returnClass, int incrementSize, long explicitInitialValue) Builds an optimizer- Parameters:
type- The optimizer type, either a short-hand name or theOptimizerclass name.returnClass- The generated value java typeincrementSize- The increment size.explicitInitialValue- The user supplied initial-value (-1 indicates the user did not specify).- Returns:
- The built optimizer
-
buildOptimizer(String, Class, int, long)instead