Package com.semedy.reasoner.api.core
Class ResultEnumeratorThreaded
java.lang.Object
com.semedy.reasoner.api.core.ResultEnumeratorThreaded
- All Implemented Interfaces:
ResultEnumerator
,Closeable
,AutoCloseable
,Cloneable
public class ResultEnumeratorThreaded
extends Object
implements Closeable, Cloneable, ResultEnumerator
enumerator for reasoning results
- Author:
- juergen
-
Constructor Summary
ConstructorDescriptionResultEnumeratorThreaded
(BlockingQueue<Object> queue, int arity, List<String> variables, CoreReadLock readlock) the producer -
Method Summary
-
Constructor Details
-
ResultEnumeratorThreaded
public ResultEnumeratorThreaded(BlockingQueue<Object> queue, int arity, List<String> variables, CoreReadLock readlock) the producer
-
-
Method Details
-
init
public void init() -
hasMoreElements
Are there more elements?- Specified by:
hasMoreElements
in interfaceResultEnumerator
- Returns:
- true if there are more elements
- Throws:
IOException
-
nextElement
Move to next element (the next element is found in the buffer)- Specified by:
nextElement
in interfaceResultEnumerator
- Throws:
IOException
-
hasFinished
Is the enumerator at the end?- Specified by:
hasFinished
in interfaceResultEnumerator
- Returns:
- true if there is no more result
- Throws:
IOException
-
getBuffer
get a result buffer- Specified by:
getBuffer
in interfaceResultEnumerator
- Returns:
- buffer for results
-
close
close the iterator- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceResultEnumerator
- Throws:
IOException
-
cloneEnumerator
clone the iterator- Specified by:
cloneEnumerator
in interfaceResultEnumerator
- Returns:
- Throws:
IOException
-