public interface QueryCancellingPolicy
QueryCancellingPolicy to be able to interrupt iteration over EntityIterable instances
associated with the StoreTransaction. The most common use case is setting timeout for the
StoreTransaction instance.
PersistentEntityStore implementation tries to to check QueryCancellingPolicy in a most
smart way in order to affect execution performance as little as possible.
| Modifier and Type | Field and Description |
|---|---|
static QueryCancellingPolicy |
NONE |
| Modifier and Type | Method and Description |
|---|---|
void |
doCancel()
Cancels iteration over EntityIterable instances which were created in the
StoreTransaction supplied with the
QueryCancellingPolicy instance. |
boolean |
needToCancel() |
static final QueryCancellingPolicy NONE
boolean needToCancel()
true when it's time to cancel iteration over EntityIterable instances which were
created in the StoreTransaction supplied with the QueryCancellingPolicy instancevoid doCancel()
QueryCancellingPolicy instance. Usually it throws an
exception which application code can handle.