Class AbstractLazyLoadingListener<R,​T>

  • Type Parameters:
    R - the data resource to access
    T - the type stored in the resource
    All Implemented Interfaces:
    LazyLoadingListenerProtocol<R,​T>
    Direct Known Subclasses:
    DefaultLazyLoadingListener

    public abstract class AbstractLazyLoadingListener<R,​T>
    extends Object
    implements LazyLoadingListenerProtocol<R,​T>
    Mongo shadow lazy loading listener implementation to pre-fetch saved data from previous sessions back to BarbelHisto.
    The simple listener implementations provide support for all BarbelQueries and all custom queries as long they use the BarbelQueries.DOCUMENT_ID as a filter criterion. If you run an instance of BarbelHisto as global singleton in your application set-up, set the singletonContext flag to true. This will increase performance as data is the listener refuses to refresh data on each retrieve operation. This is safe, if only ever one BarbelHisto instance is using the accessed data resource.
    Author:
    Niklas Schlimm