
Classes | |
| class | AjaxPageUserInfoCacheKeyInvalidator |
| class | AlwaysInvalidator |
| class | CacheKeyInvalidator |
| class | ConstantSource< T > |
| interface | Invalidator |
| class | KVCSource< T > |
| class | MutableCacheKeyInvalidator |
| class | NeverInvalidator |
| class | PageUserInfoCacheKeyInvalidator |
| interface | Source< T > |
| class | ThreadStorageCacheKeyInvalidator |
| class | TimedInvalidator |
Public Member Functions | |
| ERXLazyValue (ERXLazyValue.Source< T > dataSource, ERXLazyValue.Invalidator invalidator) | |
| ERXLazyValue (Object target, String keyPath, ERXLazyValue.Invalidator invalidator) | |
| ERXLazyValue (Object target, String keyPath) | |
| ERXLazyValue (ERXLazyValue.Source< T > dataSource) | |
| synchronized void | invalidate () |
| synchronized void | setValue (T value) |
| synchronized T | value () |
Static Public Attributes | |
| static Logger | log = Logger.getLogger(ERXLazyValue.class) |
Private Attributes | |
| ERXLazyValue.Source< T > | _dataSource |
| ERXLazyValue.Invalidator | _invalidator |
| T | _value |
| boolean | _valueCached |
| <T> | the type of the lazy value |
| ERXLazyValue | ( | ERXLazyValue< T >.Source< T > | dataSource | ) |
Constructs a new ERXLazyValue with a data source and a NeverInvalidator, which behaves like a "once" lazy value.
| dataSource | the data source for the lazy value |
| ERXLazyValue | ( | Object | target, | |
| String | keyPath | |||
| ) |
Constructs a new ERXLazyValue with a shortcut for a KVCSource and a NeverInvalidator, which behaves like a "once" lazy value.
| target | the target of the KVCSource | |
| keyPath | the keypath of the KVCSource |
| ERXLazyValue | ( | Object | target, | |
| String | keyPath, | |||
| ERXLazyValue< T >.Invalidator | invalidator | |||
| ) |
Constructs a new ERXLazyValue with a shortcut for a KVCSource and an invalidator.
| target | the target of the KVCSource | |
| keyPath | the keypath of the KVCSource | |
| invalidator | the invalidator to use |
| ERXLazyValue | ( | ERXLazyValue< T >.Source< T > | dataSource, | |
| ERXLazyValue< T >.Invalidator | invalidator | |||
| ) |
Constructs a new ERXLazyValue with a data source and an invalidator.
| dataSource | the data source for the lazy value | |
| invalidator | the invalidator to use |
| synchronized void invalidate | ( | ) |
Forecfully invalidates the lazy value, regardless of the state of the invalidator.
| synchronized void setValue | ( | T | value | ) |
Sets the backging value for this lazy value, which will always call through to the underlying data source. This will also cache the new value and notify the invalidator of a new fetched value (acting just like if value() was called on an invalidated cache).
| value | the new value |
| synchronized T value | ( | ) |
Returns the backing value for this lazy value, which will only sometimes trigger a call through to the data source.
ERXLazyValue.Source<T> _dataSource [private] |
ERXLazyValue.Invalidator _invalidator [private] |
T _value [private] |
boolean _valueCached [private] |
Logger log = Logger.getLogger(ERXLazyValue.class) [static] |
1.5.8