com.alachisoft.jvcache.runtime
Enum CacheItemPriority

java.lang.Object
  extended by java.lang.Enum<CacheItemPriority>
      extended by com.alachisoft.jvcache.runtime.CacheItemPriority
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CacheItemPriority>

public enum CacheItemPriority
extends java.lang.Enum<CacheItemPriority>

Specifies the relative priority of items stored in the Cache.

When the application's cache is full or runs low on memory, the Cache selectively purges items to free system memory. When an item is added to the Cache, you can assign it a relative priority compared to the other items stored in the Cache. Items you assign higher priority values to are less likely to be deleted from the Cache when the server is processing a large number of requests, while items you assign lower priority values are more likely to be deleted. The default is Normal.


Enum Constant Summary
AboveNormal
          Cache items with this priority level are less likely to be deleted as the server frees system memory than those assigned a Normal priority.
BelowNormal
          Cache items with this priority level are more likely to be deleted from the cache as the server frees system memory than items assigned a Normal priority.
Default
          The default value for a cached item's priority is Normal
High
          Cache items with this priority level are the least likely to be deleted from the cache as the server frees system memory.
Low
          Cache items with this priority level are the most likely to be deleted from the cache as the server frees system memory.
Normal
          Cache items with this priority level are likely to be deleted from the cache as the server frees system memory only after those items with Low or BelowNormal priority.
NotRemovable
          The cache items with this priority level will not be deleted from the cache as the server frees system memory.
 
Method Summary
static CacheItemPriority forValue(int value)
           
 int value()
           
static CacheItemPriority valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CacheItemPriority[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Low

public static final CacheItemPriority Low
Cache items with this priority level are the most likely to be deleted from the cache as the server frees system memory.


BelowNormal

public static final CacheItemPriority BelowNormal
Cache items with this priority level are more likely to be deleted from the cache as the server frees system memory than items assigned a Normal priority.


Normal

public static final CacheItemPriority Normal
Cache items with this priority level are likely to be deleted from the cache as the server frees system memory only after those items with Low or BelowNormal priority. This is the default.


AboveNormal

public static final CacheItemPriority AboveNormal
Cache items with this priority level are less likely to be deleted as the server frees system memory than those assigned a Normal priority.


High

public static final CacheItemPriority High
Cache items with this priority level are the least likely to be deleted from the cache as the server frees system memory.


NotRemovable

public static final CacheItemPriority NotRemovable
The cache items with this priority level will not be deleted from the cache as the server frees system memory.


Default

public static final CacheItemPriority Default
The default value for a cached item's priority is Normal

Method Detail

values

public static CacheItemPriority[] 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 (CacheItemPriority c : CacheItemPriority.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CacheItemPriority 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

value

public int value()
Returns:

forValue

public static CacheItemPriority forValue(int value)
Parameters:
value -
Returns: