public interface Cancellable
Modifier and Type | Method and Description |
---|---|
void |
cancel(String theCause)
Cancels the execution of this computation.
|
void cancel(String theCause)
Iterator.next()
or Iterator.hasNext()
after this function is called will result in an exception being thrown. Some implementations might have a different strategy but the
expectation for every implementation is to finish computation in a reasonable time. So implementations that always return few results without
much computation might ignore cancel calls completely.
If a computation is composed of other computations then cancel call will be typically propagated to the child computations since there could be
significant amount of work performed by them before the parent computation returns a single value.
This function is typically called from a different thread the thread that iterates over the results of this computation so implementations
should consider this.theCause
- the cause of the cancellation or null
if the cause is unknownCopyright © 2010-2016 Stardog Union. All Rights Reserved.