org.hibernate.id.enhanced
public class OptimizerFactory extends java.lang.Object
OptimizerFactory.InitialValueAwareOptimizer
instances.Modifier and Type | Class and Description |
---|---|
static class |
OptimizerFactory.HiLoOptimizer
Optimizer which applies a 'hilo' algorithm in memory to achieve
optimization.
|
static interface |
OptimizerFactory.InitialValueAwareOptimizer
Marker interface for optimizer which wish to know the user-specified initial value.
|
static class |
OptimizerFactory.LegacyHiLoAlgorithmOptimizer |
static class |
OptimizerFactory.NoopOptimizer
An optimizer that performs no optimization.
|
static class |
OptimizerFactory.OptimizerSupport
Common support for optimizer implementations.
|
static class |
OptimizerFactory.PooledLoOptimizer |
static class |
OptimizerFactory.PooledOptimizer
Optimizer which uses a pool of values, storing the next low value of the
range in the database.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HILO |
static java.lang.String |
LEGACY_HILO |
static java.lang.String |
NONE |
static java.lang.String |
POOL |
static java.lang.String |
POOL_LO |
Constructor and Description |
---|
OptimizerFactory() |
Modifier and Type | Method and Description |
---|---|
static Optimizer |
buildOptimizer(java.lang.String type,
java.lang.Class returnClass,
int incrementSize)
Deprecated.
Use
buildOptimizer(String, Class, int, long) instead |
static Optimizer |
buildOptimizer(java.lang.String type,
java.lang.Class returnClass,
int incrementSize,
long explicitInitialValue)
Builds an optimizer
|
public static final java.lang.String NONE
public static final java.lang.String HILO
public static final java.lang.String LEGACY_HILO
public static final java.lang.String POOL
public static final java.lang.String POOL_LO
public static Optimizer buildOptimizer(java.lang.String type, java.lang.Class returnClass, int incrementSize)
buildOptimizer(String, Class, int, long)
insteadtype
- The optimizer type, either a short-hand name or the OptimizerFactory.InitialValueAwareOptimizer
class name.returnClass
- The generated value java typeincrementSize
- The increment size.public static Optimizer buildOptimizer(java.lang.String type, java.lang.Class returnClass, int incrementSize, long explicitInitialValue)
type
- The optimizer type, either a short-hand name or the OptimizerFactory.InitialValueAwareOptimizer
class name.returnClass
- The generated value java typeincrementSize
- The increment size.explicitInitialValue
- The user supplied initial-value (-1 indicates the user did not specify).Copyright © 2014. All Rights Reserved.