public class Cache
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Cache.Wrapper
Wrapper for arbitrary objects stored in the cache.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PREFIX
The prefix for Audit keys in the design-time cache.
|
| Constructor and Description |
|---|
Cache() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
get(java.lang.String key)
Gets a value from the design-time cache, or null if none.
|
static boolean |
get(java.lang.String key,
boolean defaultValue)
Gets a boolean value from the design-time cache, or a default value if
none.
|
static float |
get(java.lang.String key,
float defaultValue)
Gets a float value from the design-time cache, or a default value if
none.
|
static int |
get(java.lang.String key,
int defaultValue)
Gets an int value from the design-time cache, or a default value if
none.
|
static java.lang.Object |
get(java.lang.String key,
java.lang.Object defaultValue)
Gets a value from the design-time cache, or a default value if none.
|
static void |
put(java.lang.String key,
boolean value)
Puts a boolean value into the design-time cache.
|
static void |
put(java.lang.String key,
java.lang.Boolean value)
Puts a Boolean value into the design-time cache.
|
static void |
put(java.lang.String key,
float value)
Puts a float value into the design-time cache.
|
static void |
put(java.lang.String key,
java.lang.Float value)
Puts a Float value into the design-time cache.
|
static void |
put(java.lang.String key,
int value)
Puts an int value into the cache.
|
static void |
put(java.lang.String key,
java.lang.Integer value)
Puts an Integer value into the cache.
|
static void |
put(java.lang.String key,
java.lang.Object value)
Puts a value into the design-time cache.
|
public static final java.lang.String PREFIX
public static void put(java.lang.String key,
java.lang.Object value)
key - The Audit-specific name of the value.value - The Object2Dom compatible value.public static void put(java.lang.String key,
boolean value)
key - The Audit-specific name of the value.value - The boolean value.public static void put(java.lang.String key,
java.lang.Boolean value)
key - The Audit-specific name of the value.value - The boolean value.public static void put(java.lang.String key,
int value)
key - The Audit-specific name of the value.value - The int value.public static void put(java.lang.String key,
java.lang.Integer value)
key - The Audit-specific name of the value.value - The int value.public static void put(java.lang.String key,
float value)
key - The Audit-specific name of the value.value - The float value.public static void put(java.lang.String key,
java.lang.Float value)
key - The Audit-specific name of the value.value - The float value.public static java.lang.Object get(java.lang.String key)
key - The Audit-specific name of the value.public static java.lang.Object get(java.lang.String key,
java.lang.Object defaultValue)
key - The Audit-specific name of the value.public static boolean get(java.lang.String key,
boolean defaultValue)
key - The Audit-specific name of the value.defaultValue - The default boolean value to returnjava.lang.ClassCastException - if the value is not null and not Boolean.public static int get(java.lang.String key,
int defaultValue)
key - The Audit-specific name of the value.defaultValue - The default int value to returnjava.lang.ClassCastException - if the value is not null and not Number.public static float get(java.lang.String key,
float defaultValue)
key - The Audit-specific name of the value.defaultValue - The default float value to returnjava.lang.ClassCastException - if the value is not null and not Number.