uk.ac.soton.itinnovation.grid.service.sla
Class EvictingIterator<T>

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.sla.EvictingIterator<T>
All Implemented Interfaces:
Iterator<T>

public class EvictingIterator<T>
extends Object
implements Iterator<T>

Internal use. An iterator that evicts each previous item when next() is called. This prevents the hibernate cache filling up and causing us to run out of memory.


Constructor Summary
EvictingIterator(org.hibernate.Session session, Iterator<T> source)
           
 
Method Summary
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvictingIterator

public EvictingIterator(org.hibernate.Session session,
                        Iterator<T> source)
Method Detail

next

public T next()
Specified by:
next in interface Iterator<T>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>

remove

public void remove()
Specified by:
remove in interface Iterator<T>


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.