Package org.ehcache.config
Enum ResourceType.Core
- java.lang.Object
-
- java.lang.Enum<ResourceType.Core>
-
- org.ehcache.config.ResourceType.Core
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ResourceType.Core>,ResourceType<SizedResourcePool>
- Enclosing interface:
- ResourceType<T extends ResourcePool>
public static enum ResourceType.Core extends java.lang.Enum<ResourceType.Core> implements ResourceType<SizedResourcePool>
An enumeration of coreResourceTypes in Ehcache.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ehcache.config.ResourceType
ResourceType.Core
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISKDisk: persistable,serializationrequired.HEAPHeap: not persistable,serializationnot required.OFFHEAPOffHeap: not persistable,serializationrequired.
-
Field Summary
Fields Modifier and Type Field Description private booleanpersistableprivate booleanrequiresSerializationprivate inttierHeight
-
Constructor Summary
Constructors Modifier Constructor Description privateCore(boolean persistable, boolean requiresSerialization, int tierHeight)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<SizedResourcePool>getResourcePoolClass()Gets theResourcePooltype associated with thisResourceType.intgetTierHeight()Indicates the level this resource sits in the tiering system.booleanisPersistable()Indicates whether thisResourceTypesupports persistence.booleanrequiresSerialization()Indicates whether thisResourceTyperequiresserializationsupport.java.lang.StringtoString()static ResourceType.CorevalueOf(java.lang.String name)Returns 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 Detail
-
HEAP
public static final ResourceType.Core HEAP
Heap: not persistable,serializationnot required.
-
OFFHEAP
public static final ResourceType.Core OFFHEAP
OffHeap: not persistable,serializationrequired.
-
DISK
public static final ResourceType.Core DISK
Disk: persistable,serializationrequired.
-
-
Method Detail
-
values
public static ResourceType.Core[] 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 (ResourceType.Core c : ResourceType.Core.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResourceType.Core valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getResourcePoolClass
public java.lang.Class<SizedResourcePool> 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<ResourceType.Core>
-
-