A lazy list and uses a {@link org.exoplatform.commons.utils.ListAccess} object to loadthe elements of the list. The list is read only and any write access to the list will not be permitted.
The loading policy is based on a simple batch algorithm that loads the elements by batches.
The list also keeps a cache of the retrieved elements. The cache use soft references to provide eviction of the elements if necessary. When a soft reference is cleared and access is made to an evicted element then the elements will be reloaded from the list access object.
If the list access fails to load a batch by throwing a checked exception, it will cause the list to throw an {@link IllegalStateException} wrapping the original exception. Any other kindof non checked throwable will be propagated to the caller as it is.
The implementation does not perform any kind of versionning check of the underlying data and if the underlying list access changes the state it exposes the lazy list will not be aware of it and may behave in an unexpected manner.
@author Julien Viet @version $Revision$
|
|
|
|