public class

HibernateEntityObjectQueue

extends Object
implements EntityObjectQueue
java.lang.Object
   ↳ bucket.core.persistence.hibernate.HibernateEntityObjectQueue

Class Overview

Used for batch indexing.

Summary

Fields
public static final Logger log
Public Constructors
HibernateEntityObjectQueue(List handles, SessionFactory sessionFactory)
Public Methods
void clearCaches()
Clear any underlying caches that might be kept as the queue is run through.
void close()
Release all resources (i.e.
List getNextObjects()
Get a collection of the next "group" of objects from the queue.
[Expand]
Inherited Methods
From class java.lang.Object
From interface bucket.core.persistence.EntityObjectQueue

Fields

public static final Logger log

Public Constructors

public HibernateEntityObjectQueue (List handles, SessionFactory sessionFactory)

Throws
HibernateException

Public Methods

public void clearCaches ()

Clear any underlying caches that might be kept as the queue is run through. This is an efficiency measure for when an operation is running through a large number of objects, and the underlying DAO implementation hangs on to memory for the entire session.

public void close ()

Release all resources (i.e. database connections) held by the queue. Anyone who retrieves a queue is responsible for closing it when they are done.

public List getNextObjects ()

Get a collection of the next "group" of objects from the queue. The size of this group is determined by the queue itself, it's just a "reasonable" size for the underlying implementation. If there are no more objects available, an empty list will be returned.

Returns
  • the next "group" of objects from the queue, or the empty list if there are no more objects available.