Package org.hibernate.id.enhanced
Enum StandardOptimizerDescriptor
- java.lang.Object
-
- java.lang.Enum<StandardOptimizerDescriptor>
-
- org.hibernate.id.enhanced.StandardOptimizerDescriptor
-
- All Implemented Interfaces:
Serializable
,Comparable<StandardOptimizerDescriptor>
,OptimizerDescriptor
public enum StandardOptimizerDescriptor extends Enum<StandardOptimizerDescriptor> implements OptimizerDescriptor
Enumeration of the standard Hibernate id generation optimizers.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HILO
Describes the optimizer for using a custom "hilo" algorithm optimization.LEGACY_HILO
Describes the optimizer for using a custom "hilo" algorithm optimization, following the legacy Hibernate hilo algorithm.NONE
Describes the optimizer for no optimization.POOLED
Describes the optimizer for use with tables/sequences that store the chunk information.POOLED_LO
Describes the optimizer for use with tables/sequences that store the chunk information.POOLED_LOTL
Describes the optimizer for use with tables/sequences that store the chunk information.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OptimizerDescriptor
fromExternalName(String externalName)
Interpret the incoming external name into the appropriate enum valueString
getExternalName()
Class<? extends Optimizer>
getOptimizerClass()
boolean
isPooled()
static StandardOptimizerDescriptor
valueOf(String name)
Returns the enum constant of this type with the specified name.static StandardOptimizerDescriptor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final StandardOptimizerDescriptor NONE
Describes the optimizer for no optimization.
-
HILO
public static final StandardOptimizerDescriptor HILO
Describes the optimizer for using a custom "hilo" algorithm optimization.
-
LEGACY_HILO
public static final StandardOptimizerDescriptor LEGACY_HILO
Describes the optimizer for using a custom "hilo" algorithm optimization, following the legacy Hibernate hilo algorithm.
-
POOLED
public static final StandardOptimizerDescriptor POOLED
Describes the optimizer for use with tables/sequences that store the chunk information. Here, specifically the hi value is stored in the database.
-
POOLED_LO
public static final StandardOptimizerDescriptor POOLED_LO
Describes the optimizer for use with tables/sequences that store the chunk information. Here, specifically the lo value is stored in the database.
-
POOLED_LOTL
public static final StandardOptimizerDescriptor POOLED_LOTL
Describes the optimizer for use with tables/sequences that store the chunk information. Here, specifically the lo value is stored in the database and ThreadLocal used to cache the generation state.
-
-
Method Detail
-
values
public static StandardOptimizerDescriptor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StandardOptimizerDescriptor c : StandardOptimizerDescriptor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StandardOptimizerDescriptor valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getExternalName
public String getExternalName()
- Specified by:
getExternalName
in interfaceOptimizerDescriptor
-
getOptimizerClass
public Class<? extends Optimizer> getOptimizerClass()
- Specified by:
getOptimizerClass
in interfaceOptimizerDescriptor
-
isPooled
public boolean isPooled()
- Specified by:
isPooled
in interfaceOptimizerDescriptor
-
fromExternalName
public static OptimizerDescriptor fromExternalName(String externalName)
Interpret the incoming external name into the appropriate enum value- Parameters:
externalName
- The external name- Returns:
- The corresponding enum value; if no external name is supplied,
NONE
is returned; if an unrecognized external name is supplied,null
is returned
-
-