net.esper.client
Enum ConfigurationDBRef.CacheReferenceType

java.lang.Object
  extended by java.lang.Enum<ConfigurationDBRef.CacheReferenceType>
      extended by net.esper.client.ConfigurationDBRef.CacheReferenceType
All Implemented Interfaces:
Serializable, Comparable<ConfigurationDBRef.CacheReferenceType>
Enclosing class:
ConfigurationDBRef

public static enum ConfigurationDBRef.CacheReferenceType
extends Enum<ConfigurationDBRef.CacheReferenceType>

Enum indicating what kind of references are used to store the cache map's keys and values.


Enum Constant Summary
HARD
          Constant indicating that hard references should be used.
SOFT
          Constant indicating that soft references should be used.
WEAK
          Constant indicating that weak references should be used.
 
Method Summary
static ConfigurationDBRef.CacheReferenceType getDefault()
          The default policy is set to WEAK to reduce the chance that out-of-memory errors occur as caches fill, and stay backwards compatible with prior Esper releases.
static ConfigurationDBRef.CacheReferenceType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ConfigurationDBRef.CacheReferenceType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HARD

public static final ConfigurationDBRef.CacheReferenceType HARD
Constant indicating that hard references should be used.

Does not allow garbage collection to remove cache entries.


SOFT

public static final ConfigurationDBRef.CacheReferenceType SOFT
Constant indicating that soft references should be used.

Allows garbage collection to remove cache entries only after all weak references have been collected.


WEAK

public static final ConfigurationDBRef.CacheReferenceType WEAK
Constant indicating that weak references should be used.

Allows garbage collection to remove cache entries.

Method Detail

values

public static final ConfigurationDBRef.CacheReferenceType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ConfigurationDBRef.CacheReferenceType c : ConfigurationDBRef.CacheReferenceType.values())
        System.out.println(c);

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

valueOf

public static ConfigurationDBRef.CacheReferenceType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name

getDefault

public static ConfigurationDBRef.CacheReferenceType getDefault()
The default policy is set to WEAK to reduce the chance that out-of-memory errors occur as caches fill, and stay backwards compatible with prior Esper releases.

Returns:
default reference type

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com