|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.stream.adjunct.StreamingAdjunct
public class StreamingAdjunct
This abstract class supplements an Expression
with methods used at compile-time
to support streaming, by generating a Watch
or Feed
that allows the expression to be evaluated in push mode.
There is a subclass for each kind of expression that can be evaluated in push mode. Typically such evaluation will either be at event granularity (a Watch) or at item granularity (a Feed). Most expressions implement one or the other. There is a fallback implementation that allows any expression to be evaluated as a Feed, but it involves buffering the input in memory and only evaluating the expression when all the input is available.
Constructor Summary | |
---|---|
StreamingAdjunct()
|
Method Summary | |
---|---|
Configuration |
getConfiguration()
Get the Saxon Configuration |
FeedMaker |
getFeedMaker(Expression expression,
int arg)
Get a FeedMaker, a factory class that creates a Watch to evaluate this expression in streaming mode. |
WatchMaker |
getWatchMaker(Expression expression,
List<String> reasonsForFailure)
Get a WatchMaker, a factory class that creates a Watch to evaluate this expression in streaming mode. |
static StreamingAdjunct |
makeStreamingAdjunct(Expression exp,
Configuration config)
Make a streaming adjunct for a particular expression. |
void |
setConfiguration(Configuration config)
Set the Saxon Configuration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamingAdjunct()
Method Detail |
---|
public void setConfiguration(Configuration config)
config
- the Configurationpublic Configuration getConfiguration()
public WatchMaker getWatchMaker(Expression expression, List<String> reasonsForFailure) throws XPathException
Expression.WATCH_METHOD
expression
- the expression to be evaluated in streaming modereasonsForFailure
- if non-null, this is a list supplied by the caller which will be populated
by the callee with one or more messages indicating why it was not possible to allocate a WatchMaker.
Normally if the list is non-empty on return, the return value from the method will be null.
XPathException
public FeedMaker getFeedMaker(Expression expression, int arg) throws XPathException
expression
- the expression to be evaluated in streaming modearg
- identifies the argument with respect to which the expression is to be inverted:
usually 0 to indicate the first argument is the value that is streamed. Argument numbering
is the same as the sequence of arguments/operands returned by the method Expression.iterateSubExpressions()
XPathException
public static StreamingAdjunct makeStreamingAdjunct(Expression exp, Configuration config)
This would normally be a method on the class Expression; the only reason it isn't is because this code is specific to commercial editions of Saxon.
exp
- the expression to be compiledconfig
- the Saxon Configuration
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |