Package org.ehcache.config
Enum ResourceType.Core
- All Implemented Interfaces:
Serializable,Comparable<ResourceType.Core>,java.lang.constant.Constable,ResourceType<SizedResourcePool>
- Enclosing interface:
ResourceType<T extends ResourcePool>
public static enum ResourceType.Core
extends Enum<ResourceType.Core>
implements ResourceType<SizedResourcePool>
An enumeration of core
ResourceTypes in Ehcache.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface org.ehcache.config.ResourceType
ResourceType.Core -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDisk: persistable,serializationrequired.Heap: not persistable,serializationnot required.OffHeap: not persistable,serializationrequired. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final booleanprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCore(boolean persistable, boolean requiresSerialization, int tierHeight) -
Method Summary
Modifier and TypeMethodDescriptionGets theResourcePooltype associated with thisResourceType.intIndicates the level this resource sits in the tiering system.booleanIndicates whether thisResourceTypesupports persistence.booleanIndicates whether thisResourceTyperequiresserializationsupport.toString()static ResourceType.CoreReturns the enum constant of this type with the specified name.static ResourceType.Core[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
HEAP
Heap: not persistable,serializationnot required. -
OFFHEAP
OffHeap: not persistable,serializationrequired. -
DISK
Disk: persistable,serializationrequired.
-
-
Field Details
-
persistable
private final boolean persistable -
requiresSerialization
private final boolean requiresSerialization -
tierHeight
private final int tierHeight
-
-
Constructor Details
-
Core
private Core(boolean persistable, boolean requiresSerialization, int tierHeight)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getResourcePoolClass
Description copied from interface:ResourceTypeGets theResourcePooltype associated with thisResourceType.- Specified by:
getResourcePoolClassin interfaceResourceType<SizedResourcePool>- Returns:
- the
ResourcePooltype associated with this type
-
isPersistable
public boolean isPersistable()Description copied from interface:ResourceTypeIndicates whether thisResourceTypesupports persistence.Persistence in this context means that a
ResourcePoolof thisResourceTypecan be configured so that data stored in it will survive a JVM restart.- Specified by:
isPersistablein interfaceResourceType<SizedResourcePool>- Returns:
trueif it supports persistence,falseotherwise
-
requiresSerialization
public boolean requiresSerialization()Description copied from interface:ResourceTypeIndicates whether thisResourceTyperequiresserializationsupport.- Specified by:
requiresSerializationin interfaceResourceType<SizedResourcePool>- Returns:
trueif serializers are required,falseotherwise
-
getTierHeight
public int getTierHeight()Description copied from interface:ResourceTypeIndicates the level this resource sits in the tiering system.Higher means resource is faster and less abundant, lower means resource is slower but potentially larger.
- Specified by:
getTierHeightin interfaceResourceType<SizedResourcePool>- Returns:
- the resource tier height
-
toString
- Overrides:
toStringin classEnum<ResourceType.Core>
-