|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.propertyset.PropertySetCache
public class PropertySetCache
This class provides a cache for PropertySet values as used by JiraCachingPropertySet.
The intention is that the cache is non-blocking for reads, and it is up to the JiraCachingPropertySet to synchronise writes with reading/writing from the underlying Property Set.
This cache looks and works a lot like a PropertySet for obvious reasons, however it is not declared to implement
PropertySet because it does not implement all methods - only the ones we want to cache for. With that in mind, it
generally attempts to follow the contract of the PropertySet
interface. Namely:
InvalidPropertyTypeException
should be thrown.
JiraCachingPropertySet
,
PropertySet
Method Summary | |
---|---|
void |
bulkLoad(com.opensymphony.module.propertyset.PropertySet source)
Eagerly loads all the values from the given PropertySet into this cache. |
void |
cacheExistance(java.lang.String key,
boolean keyExists)
|
java.lang.Boolean |
exists(java.lang.String key)
Returns the cached value for whether the given key exists in the underlying PropertySet. |
boolean |
getBoolean(java.lang.String key)
|
byte[] |
getData(java.lang.String key)
|
java.util.Date |
getDate(java.lang.String key)
|
double |
getDouble(java.lang.String key)
|
int |
getInt(java.lang.String key)
|
long |
getLong(java.lang.String key)
|
java.lang.Object |
getObject(java.lang.String key)
|
java.util.Properties |
getProperties(java.lang.String key)
|
java.lang.String |
getString(java.lang.String key)
|
java.lang.String |
getText(java.lang.String key)
|
org.w3c.dom.Document |
getXML(java.lang.String key)
|
void |
remove(java.lang.String key)
|
void |
setBoolean(java.lang.String key,
boolean value)
|
void |
setData(java.lang.String key,
byte[] value)
|
void |
setDate(java.lang.String key,
java.util.Date value)
|
void |
setDouble(java.lang.String key,
double value)
|
void |
setInt(java.lang.String key,
int value)
|
void |
setLong(java.lang.String key,
long value)
|
void |
setObject(java.lang.String key,
java.lang.Object value)
|
void |
setProperties(java.lang.String key,
java.util.Properties value)
|
void |
setString(java.lang.String key,
java.lang.String value)
|
void |
setText(java.lang.String key,
java.lang.String value)
|
void |
setXML(java.lang.String key,
org.w3c.dom.Document value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setBoolean(java.lang.String key, boolean value)
public boolean getBoolean(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void setData(java.lang.String key, byte[] value)
public byte[] getData(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void setDate(java.lang.String key, java.util.Date value)
public java.util.Date getDate(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void setDouble(java.lang.String key, double value)
public double getDouble(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void setInt(java.lang.String key, int value)
public int getInt(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void setLong(java.lang.String key, long value)
public long getLong(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void setObject(java.lang.String key, java.lang.Object value)
public java.lang.Object getObject(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void setProperties(java.lang.String key, java.util.Properties value)
public java.util.Properties getProperties(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void setString(java.lang.String key, java.lang.String value)
public java.lang.String getString(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException, com.opensymphony.module.propertyset.InvalidPropertyTypeException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.opensymphony.module.propertyset.InvalidPropertyTypeException
public void setText(java.lang.String key, java.lang.String value)
public java.lang.String getText(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void setXML(java.lang.String key, org.w3c.dom.Document value)
public org.w3c.dom.Document getXML(java.lang.String key) throws com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
com.atlassian.jira.propertyset.PropertySetCache.NoValueCachedException
public void remove(java.lang.String key)
public void bulkLoad(com.opensymphony.module.propertyset.PropertySet source)
source
- The PropertySet to bulk load from.public java.lang.Boolean exists(java.lang.String key)
It is important not to confuse this method with the Map.containsKey(java.lang.Object)
method.
key
- The property key.
JiraCachingPropertySet.exists(String)
public void cacheExistance(java.lang.String key, boolean keyExists)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |