org.trippi.impl.base
Class PoolAwareTripleIterator
java.lang.Object
org.trippi.TripleIterator
org.trippi.impl.base.PoolAwareTripleIterator
public class PoolAwareTripleIterator
- extends TripleIterator
Wraps a TripleIterator
and automatically releases the
associated session to the pool when closed.
- Author:
- cwilper@cs.cornell.edu
Method Summary |
void |
close()
Close the wrapped iterator and release the session to the pool. |
void |
finalize()
Ensure close() gets called at garbage collection time. |
boolean |
hasNext()
Return true if there are any more triples. |
org.jrdf.graph.Triple |
next()
Return the next triple. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PoolAwareTripleIterator
public PoolAwareTripleIterator(TripleIterator iter,
TriplestoreSession session,
TriplestoreSessionPool pool)
hasNext
public boolean hasNext()
throws TrippiException
- Description copied from class:
TripleIterator
- Return true if there are any more triples.
- Specified by:
hasNext
in class TripleIterator
- Throws:
TrippiException
next
public org.jrdf.graph.Triple next()
throws TrippiException
- Description copied from class:
TripleIterator
- Return the next triple.
- Specified by:
next
in class TripleIterator
- Throws:
TrippiException
close
public void close()
throws TrippiException
- Close the wrapped iterator and release the session to the pool.
- Specified by:
close
in class TripleIterator
- Throws:
TrippiException
finalize
public void finalize()
throws TrippiException
- Ensure close() gets called at garbage collection time.
- Overrides:
finalize
in class java.lang.Object
- Throws:
TrippiException