This class is deprecated.
This class is inherently unsafe to use in a clustered environment. Use CachingOfBizPropertySet
(keyed as "ofbiz-cached"
instead. Since v6.2.
Class Overview
A PropertySet which decorates another PropertySet and caches the results. Must be correctly initialised via the
init(Map, Map)
before use.
Similar to com.opensymphony.module.propertyset.cached.CachingPropertySet class but does more caching.
This class is threadsafe. It uses a Lock to co-ordinate concurrent access. This means that improper
publication is avoided as long as init(Map, Map)
is called from the creating thread before use.
Summary
[Expand]
Inherited Constants |
From interface
com.opensymphony.module.propertyset.PropertySet
int |
BOOLEAN |
|
int |
DATA |
|
int |
DATE |
|
int |
DOUBLE |
|
int |
INT |
|
int |
LONG |
|
int |
OBJECT |
|
int |
PROPERTIES |
|
int |
STRING |
|
int |
TEXT |
|
int |
XML |
|
|
Public Methods |
void
|
clearCache()
Clears any cached properties.
|
boolean
|
exists(String key)
|
Object
|
getAsActualType(String key)
|
boolean
|
getBoolean(String key)
|
byte[]
|
getData(String key)
|
Date
|
getDate(String key)
|
double
|
getDouble(String key)
|
int
|
getInt(String key)
|
Collection
|
getKeys()
|
Collection
|
getKeys(int type)
|
Collection
|
getKeys(String prefix)
|
Collection
|
getKeys(String prefix, int type)
|
long
|
getLong(String key)
|
Object
|
getObject(String key)
|
Properties
|
getProperties(String key)
|
PropertySetSchema
|
getSchema()
|
String
|
getString(String key)
|
String
|
getText(String key)
|
int
|
getType(String key)
|
Document
|
getXML(String key)
|
void
|
init(Map config, Map args)
Initialises this JiraCachingPropertySet.
|
boolean
|
isSettable(String property)
|
void
|
remove()
|
void
|
remove(String key)
|
void
|
setAsActualType(String key, Object value)
|
void
|
setBoolean(String key, boolean value)
|
void
|
setData(String key, byte[] value)
|
void
|
setDate(String key, Date value)
|
void
|
setDouble(String key, double value)
|
void
|
setInt(String key, int value)
|
void
|
setLong(String key, long value)
|
void
|
setObject(String key, Object value)
|
void
|
setProperties(String key, Properties value)
|
void
|
setSchema(PropertySetSchema schema)
|
void
|
setString(String key, String value)
|
void
|
setText(String key, String value)
|
void
|
setXML(String key, Document value)
|
boolean
|
supportsType(int type)
|
boolean
|
supportsTypes()
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
com.opensymphony.module.propertyset.PropertySet
boolean
|
exists(String arg0)
|
Object
|
getAsActualType(String arg0)
|
boolean
|
getBoolean(String arg0)
|
byte[]
|
getData(String arg0)
|
Date
|
getDate(String arg0)
|
double
|
getDouble(String arg0)
|
int
|
getInt(String arg0)
|
Collection
|
getKeys()
|
Collection
|
getKeys(int arg0)
|
Collection
|
getKeys(String arg0)
|
Collection
|
getKeys(String arg0, int arg1)
|
long
|
getLong(String arg0)
|
Object
|
getObject(String arg0)
|
Properties
|
getProperties(String arg0)
|
PropertySetSchema
|
getSchema()
|
String
|
getString(String arg0)
|
String
|
getText(String arg0)
|
int
|
getType(String arg0)
|
Document
|
getXML(String arg0)
|
void
|
init(Map arg0, Map arg1)
|
boolean
|
isSettable(String arg0)
|
void
|
remove()
|
void
|
remove(String arg0)
|
void
|
setAsActualType(String arg0, Object arg1)
|
void
|
setBoolean(String arg0, boolean arg1)
|
void
|
setData(String arg0, byte[] arg1)
|
void
|
setDate(String arg0, Date arg1)
|
void
|
setDouble(String arg0, double arg1)
|
void
|
setInt(String arg0, int arg1)
|
void
|
setLong(String arg0, long arg1)
|
void
|
setObject(String arg0, Object arg1)
|
void
|
setProperties(String arg0, Properties arg1)
|
void
|
setSchema(PropertySetSchema arg0)
|
void
|
setString(String arg0, String arg1)
|
void
|
setText(String arg0, String arg1)
|
void
|
setXML(String arg0, Document arg1)
|
boolean
|
supportsType(int arg0)
|
boolean
|
supportsTypes()
|
|
Public Constructors
public
JiraCachingPropertySet
()
Public Methods
public
void
clearCache
()
Clears any cached properties. Does not affect the decorated PropertySet
.
public
boolean
exists
(String key)
public
boolean
getBoolean
(String key)
public
byte[]
getData
(String key)
public
double
getDouble
(String key)
public
int
getInt
(String key)
public
long
getLong
(String key)
public
int
getType
(String key)
public
Document
getXML
(String key)
public
void
init
(Map config, Map args)
Initialises this JiraCachingPropertySet. PropertySetManager first constructs an instance of a PropertySet, and
then calls init().
The args
parameter must always contain an entry of type PropertySet under the key "PropertySet".
If args
contains a Boolean
entry under the key of "bulkload" which is set to
true
, then all the values in the underlying PropertySet will be preloaded into the cache.
Parameters
config
| Config from PropertySetConfig |
args
| Map of args passed to PropertySetManager.getInstance() |
public
boolean
isSettable
(String property)
public
void
remove
(String key)
public
void
setBoolean
(String key, boolean value)
public
void
setData
(String key, byte[] value)
public
void
setDouble
(String key, double value)
public
void
setInt
(String key, int value)
public
void
setLong
(String key, long value)
public
void
setXML
(String key, Document value)
public
boolean
supportsType
(int type)
public
boolean
supportsTypes
()