org.ehcache.config
Enum ResourceType.Core

java.lang.Object
  extended by java.lang.Enum<ResourceType.Core>
      extended by 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 core ResourceTypes in Ehcache.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ehcache.config.ResourceType
ResourceType.Core
 
Enum Constant Summary
DISK
          Disk: persistable, serialization required.
HEAP
          Heap: not persistable, serialization not required.
OFFHEAP
          OffHeap: not persistable, serialization required.
 
Method Summary
 java.lang.Class<SizedResourcePool> getResourcePoolClass()
          Gets the ResourcePool type associated with this ResourceType.
 int getTierHeight()
          Indicates the level this resource sits in the tiering system.
 boolean isPersistable()
          Indicates whether this ResourceType supports persistence.
 boolean requiresSerialization()
          Indicates whether this ResourceType requires serialization support.
 java.lang.String toString()
           
static ResourceType.Core valueOf(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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HEAP

public static final ResourceType.Core HEAP
Heap: not persistable, serialization not required.


OFFHEAP

public static final ResourceType.Core OFFHEAP
OffHeap: not persistable, serialization required.


DISK

public static final ResourceType.Core DISK
Disk: persistable, serialization required.

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 name
java.lang.NullPointerException - if the argument is null

getResourcePoolClass

public java.lang.Class<SizedResourcePool> getResourcePoolClass()
Description copied from interface: ResourceType
Gets the ResourcePool type associated with this ResourceType.

Specified by:
getResourcePoolClass in interface ResourceType<SizedResourcePool>
Returns:
the ResourcePool type associated with this type

isPersistable

public boolean isPersistable()
Description copied from interface: ResourceType
Indicates whether this ResourceType supports persistence.

Persistence in this context means that a ResourcePool of this ResourceType can be configured so that data stored in it will survive a JVM restart.

Specified by:
isPersistable in interface ResourceType<SizedResourcePool>
Returns:
true if it supports persistence, false otherwise

requiresSerialization

public boolean requiresSerialization()
Description copied from interface: ResourceType
Indicates whether this ResourceType requires serialization support.

Specified by:
requiresSerialization in interface ResourceType<SizedResourcePool>
Returns:
true if serializers are required, false otherwise

getTierHeight

public int getTierHeight()
Description copied from interface: ResourceType
Indicates 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:
getTierHeight in interface ResourceType<SizedResourcePool>
Returns:
the resource tier height

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<ResourceType.Core>