Enum 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

      Enum Constants 
      Enum Constant Description
      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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static CacheItemPriority forValue​(int value)
      retreives the enum constant of the specified value, if exists.
      static CacheItemPriority getValueFromString​(java.lang.String value)
      retreives the enum constant of the specified value, if exists.
      int value()
      Order is important in enums.By using Value() method, each enum constant index can be found, just like array index.
      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

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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.
      • 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.
      • 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
      • forValue

        public static CacheItemPriority forValue​(int value)
        retreives the enum constant of the specified value, if exists.
        Parameters:
        value - enum constant index
        Returns:
        enum constant
      • value

        public int value()
        Order is important in enums.By using Value() method, each enum constant index can be found, just like array index.
        Returns:
        enum constant index
      • getValueFromString

        public static CacheItemPriority getValueFromString​(java.lang.String value)
        retreives the enum constant of the specified value, if exists.
        Parameters:
        value - enum constant index
        Returns:
        enum constant