Enum Class BeanInstanceCaching
- All Implemented Interfaces:
Serializable, Comparable<BeanInstanceCaching>, Constable
@Incubating(since="8.0",
group="bootstrap-safe-beans")
@SPI(USE)
public enum BeanInstanceCaching
extends Enum<BeanInstanceCaching>
Controls caching of bean references obtained from the
ManagedBeanRegistry.
This policy does not change the underlying bean container's scope semantics.- Since:
- 8.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic BeanInstanceCachingReturns the enum constant of this class with the specified name.static BeanInstanceCaching[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALLOW
Allow reuse of a shared, cached instance. Repeated calls for the same bean class may return the sameManagedBeanhandle. -
DISALLOW
Bypass Hibernate's bean cache for both lookup and storage. Each call returns an independently managedManagedBeanhandle that must be released viaManagedBeanRegistry.releaseBean(ManagedBean). The underlying container's scope semantics may still cause handles to refer to the same bean instance.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-