Class MemoryEfficientLazyEntityList

All Implemented Interfaces:
EntityList, AutoCloseable, Iterable<Entity>

public class MemoryEfficientLazyEntityList extends AbstractLazyEntityList implements AutoCloseable
An implementation of EntityList that loads the entities in batches (similar to LazyEntityList), but uses a new Context for every page. When a new page is loaded, the old Context of the previous page will be closed. This implementation is efficient when the data is accessed in the order of the list. It's very inefficient if the elements are accessed randomly. In addition, entities should only be used within the loop, because not all operations are supported when the is closed.
  • Constructor Details

  • Method Details