this.isSelectAsksMultimatches = isSelectAsksMultimatches;
if (matchRecognizeSpec.getInterval() != null)
{
scheduleSlot = agentInstanceContext.getStatementContext().getScheduleBucket().allocateSlot();
ScheduleHandleCallback callback = new ScheduleHandleCallback() {
public void scheduledTrigger(ExtensionServicesContext extensionServicesContext)
{
EventRowRegexNFAView.this.triggered();
}
};
handle = new EPStatementHandleCallback(agentInstanceContext.getEpStatementAgentInstanceHandle(), callback);
schedule = new TreeMap<Long, Object>();
agentInstanceContext.addTerminationCallback(this);
}
else
{
scheduleSlot = null;
handle = null;
schedule = null;
}
this.windowMatchedEventset = new LinkedHashSet<EventBean>();
// handle "previous" function nodes (performance-optimized for direct index access)
RegexPartitionStateRandomAccessGetter randomAccessByIndexGetter;
if (!callbacksPerIndex.isEmpty())
{
// Build an array of indexes
int[] randomAccessIndexesRequested = new int[callbacksPerIndex.size()];
int count = 0;
for (Map.Entry<Integer, List<ExprPreviousMatchRecognizeNode>> entry : callbacksPerIndex.entrySet())
{
randomAccessIndexesRequested[count] = entry.getKey();
count++;
}
randomAccessByIndexGetter = new RegexPartitionStateRandomAccessGetter(randomAccessIndexesRequested, isUnbound);
// Since an expression such as "prior(2, price), prior(8, price)" translates into {2, 8} the relative index is {0, 1}.
// Map the expression-supplied index to a relative index
count = 0;
for (Map.Entry<Integer, List<ExprPreviousMatchRecognizeNode>> entry : callbacksPerIndex.entrySet())
{
for (ExprPreviousMatchRecognizeNode callback : entry.getValue())
{
callback.setGetter(randomAccessByIndexGetter);
callback.setAssignedIndex(count);
}
count++;
}
}
else