

Public Member Functions | |
| CacheableIndexedPropertySupport (Object instance, Class valueType, Class elementType, Method getter, Method setter, Method indexedGetter, Method indexedSetter, CachingStrategy cachingStrategy) | |
| Object | getValue () throws IllegalAccessException, IllegalArgumentException, InvocationTargetException |
| void | setValue (Object newValue) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException |
| Object | getIndexedValue (int index) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException |
| void | setIndexedValue (int index, Object val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException |
| PropertyEditor | getPropertyEditor () |
| void | resetCache () |
Private Attributes | |
| Object | cachedValue |
| CachingStrategy | cachingStrategy |
<font size="-1" color="#FF0000">**For internal use only** </font> A version of IndexedPropertySupport that caches the property value to avoid that the underlying Bean has to handle bursts of getValue() calls. The caching strategy is given at construction time.
| cern::gp::nodes::impl::CacheableIndexedPropertySupport::CacheableIndexedPropertySupport | ( | Object | instance, | |
| Class | valueType, | |||
| Class | elementType, | |||
| Method | getter, | |||
| Method | setter, | |||
| Method | indexedGetter, | |||
| Method | indexedSetter, | |||
| CachingStrategy | cachingStrategy | |||
| ) | [inline] |
Constructor.
| instance | the bean for which these properties exist | |
| valueType | type of the entire property | |
| elementType | type of one element of the property | |
| getter | get method for the entire property | |
| setter | set method for the entire property | |
| indexedGetter | get method for one element | |
| indexedSetter | set method for one element |
| Object cern::gp::nodes::impl::CacheableIndexedPropertySupport::getIndexedValue | ( | int | index | ) | throws IllegalAccessException, IllegalArgumentException, InvocationTargetException [inline] |
overrides getIndexedValue, and caches the value
References cachedValue, cachingStrategy, cern::gp::nodes::cache::CachingStrategy::isCacheValid(), and cern::gp::nodes::cache::CachingStrategy::validateCache().
| PropertyEditor cern::gp::nodes::impl::CacheableIndexedPropertySupport::getPropertyEditor | ( | ) | [inline] |
Returns an instance of property editor for this property. The implementation reconizes a special type of PropertyEditor that implements cern.gp.beans.BeanDependentPropertyEditor and invoke their initialization method.
null if there should not be any editor. | Object cern::gp::nodes::impl::CacheableIndexedPropertySupport::getValue | ( | ) | throws IllegalAccessException, IllegalArgumentException, InvocationTargetException [inline] |
overrides getValue, and accesses the Bean only if the cache has expired
References cachedValue, cachingStrategy, cern::gp::nodes::cache::CachingStrategy::isCacheValid(), and cern::gp::nodes::cache::CachingStrategy::validateCache().
| void cern::gp::nodes::impl::CacheableIndexedPropertySupport::resetCache | ( | ) | [inline] |
reset the cache for this property
Implements cern::gp::nodes::cache::Cacheable.
References cachingStrategy, and cern::gp::nodes::cache::CachingStrategy::invalidateCache().
| void cern::gp::nodes::impl::CacheableIndexedPropertySupport::setIndexedValue | ( | int | index, | |
| Object | val | |||
| ) | throws IllegalAccessException, IllegalArgumentException, InvocationTargetException [inline] |
overrides setIndexedValue, and caches the value
References cachedValue.
| void cern::gp::nodes::impl::CacheableIndexedPropertySupport::setValue | ( | Object | newValue | ) | throws IllegalAccessException, IllegalArgumentException, InvocationTargetException [inline] |
overrides setValue, and caches the value
References cachedValue, cachingStrategy, and cern::gp::nodes::cache::CachingStrategy::validateCache().
Object cern::gp::nodes::impl::CacheableIndexedPropertySupport::cachedValue [private] |
cached value
Referenced by getIndexedValue(), getValue(), setIndexedValue(), and setValue().
Referenced by getIndexedValue(), getValue(), resetCache(), and setValue().
1.6.2