|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.chemistry.opencmis.client.bindings.cache.impl.AbstractMapCacheLevel
public abstract class AbstractMapCacheLevel
Abstract Map cache.
Constructor Summary | |
---|---|
AbstractMapCacheLevel()
|
Method Summary | |
---|---|
protected void |
disableKeyFallback()
Disables the fallback key. |
protected void |
disableSingeValueFallback()
Disables the single value fallback. |
protected void |
enableKeyFallback(String key)
Enables a fallback key if no value was found for a requested key. |
protected void |
enableSingeValueFallback()
Enables the single value fallback. |
Object |
get(String key)
Retrieves an object from the cache level. |
protected boolean |
getBooleanParameter(Map<String,String> parameters,
String name,
boolean defValue)
Extracts a boolean parameter from the parameters. |
protected float |
getFloatParameter(Map<String,String> parameters,
String name,
float defValue)
Extracts a float parameter from the parameters. |
protected int |
getIntParameter(Map<String,String> parameters,
String name,
int defValue)
Extracts an integer parameter from the parameters. |
protected Map<String,Object> |
getMap()
Returns the internal map. |
abstract void |
initialize(Map<String,String> parameters)
Initialize the cache level. |
void |
put(Object value,
String key)
Adds an object to the cache level. |
void |
remove(String key)
Removes an object from this cache level. |
protected void |
setMap(Map<String,Object> map)
Sets the internal map. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractMapCacheLevel()
Method Detail |
---|
public abstract void initialize(Map<String,String> parameters)
CacheLevel
initialize
in interface CacheLevel
parameters
- level parameterspublic Object get(String key)
CacheLevel
get
in interface CacheLevel
key
- the key at this cache level
null
if the object doesn't existpublic void put(Object value, String key)
CacheLevel
put
in interface CacheLevel
value
- the objectkey
- the key at this levelpublic void remove(String key)
CacheLevel
remove
in interface CacheLevel
key
- the key at this cache levelprotected Map<String,Object> getMap()
protected void setMap(Map<String,Object> map)
protected void enableKeyFallback(String key)
protected void disableKeyFallback()
protected void enableSingeValueFallback()
protected void disableSingeValueFallback()
protected int getIntParameter(Map<String,String> parameters, String name, int defValue)
parameters
- the parameter mapname
- the parameter namedefValue
- the default value if the parameter can't be foundprotected float getFloatParameter(Map<String,String> parameters, String name, float defValue)
parameters
- the parameter mapname
- the parameter namedefValue
- the default value if the parameter can't be foundprotected boolean getBooleanParameter(Map<String,String> parameters, String name, boolean defValue)
parameters
- the parameter mapname
- the parameter namedefValue
- the default value if the parameter can't be foundpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |