Package org.ehcache.config
Enum Class ResourceType.Core
- All Implemented Interfaces:
Serializable,Comparable<ResourceType.Core>,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, ResourceType.SharedResource<T extends ResourceType<?>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDisk: persistable,serializationrequired.Heap: not persistable,serializationnot required.OffHeap: not persistable,serializationrequired. -
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 class with the specified name.static ResourceType.Core[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HEAP
Heap: not persistable,serializationnot required. -
OFFHEAP
OffHeap: not persistable,serializationrequired. -
DISK
Disk: persistable,serializationrequired.
-
-
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
-
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>
-