public class StructuredCache
extends java.lang.Object
Constructor and Description |
---|
StructuredCache()
Initialize the new instance with default values.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the whole cache (all sections).
|
void |
clearSection(java.lang.String section)
Removes all cached objects from the specified section.
|
protected java.util.Map<java.lang.Object,java.lang.Object> |
createSlot(java.lang.String slotName) |
java.lang.Object |
find(java.lang.String section,
java.lang.Object key)
Tries to find a cached object that was stored under the given key in the
specified cache section.
|
protected java.util.Map<java.lang.Object,java.lang.Object> |
findSlot(java.lang.String slotName) |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Object,java.lang.Object>> |
getCache() |
protected java.util.Map<java.lang.Object,java.lang.Object> |
getSlot(java.lang.String slotName) |
protected java.util.Map<java.lang.Object,java.lang.Object> |
newSlot() |
java.lang.Object |
remove(java.lang.String section,
java.lang.Object key)
Tries to remove a cached object that was stored under the given key in the
specified cache section.
|
protected void |
setCache(java.util.Map<java.lang.String,java.util.Map<java.lang.Object,java.lang.Object>> newValue) |
protected void |
setSlot(java.lang.String slotName,
java.util.Map<java.lang.Object,java.lang.Object> slot) |
void |
store(java.lang.String section,
java.lang.Object key,
java.lang.Object value)
Stores in the specified section of the cache the given key/value pair
|
public StructuredCache()
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Object,java.lang.Object>> getCache()
protected void setCache(java.util.Map<java.lang.String,java.util.Map<java.lang.Object,java.lang.Object>> newValue)
public void store(java.lang.String section, java.lang.Object key, java.lang.Object value)
section
- The name of the sectionkey
- The key under which the value can be foundvalue
- The value to cachepublic java.lang.Object find(java.lang.String section, java.lang.Object key)
section
- The name of the sectionkey
- The key under which the value can be foundpublic java.lang.Object remove(java.lang.String section, java.lang.Object key)
section
- The name of the sectionkey
- The key under which the value can be foundpublic void clear()
public void clearSection(java.lang.String section)
section
- The name of the cache section to clearprotected java.util.Map<java.lang.Object,java.lang.Object> newSlot()
protected java.util.Map<java.lang.Object,java.lang.Object> getSlot(java.lang.String slotName)
protected java.util.Map<java.lang.Object,java.lang.Object> findSlot(java.lang.String slotName)
protected void setSlot(java.lang.String slotName, java.util.Map<java.lang.Object,java.lang.Object> slot)
protected java.util.Map<java.lang.Object,java.lang.Object> createSlot(java.lang.String slotName)