/**************************************************************************************
* Copyright (C) 2008 EsperTech, Inc. All rights reserved. *
* http://esper.codehaus.org *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
**************************************************************************************/
package com.espertech.esper.epl.view;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.collection.UniformPair;
import com.espertech.esper.core.context.util.AgentInstanceContext;
import com.espertech.esper.epl.core.ResultSetProcessor;
/**
* A view that handles the "output snapshot" keyword in output rate stabilizing.
*/
public class OutputProcessViewConditionSnapshotPostProcess extends OutputProcessViewConditionSnapshot
{
private final OutputStrategyPostProcess postProcessor;
public OutputProcessViewConditionSnapshotPostProcess(ResultSetProcessor resultSetProcessor, Long afterConditionTime, Integer afterConditionNumberOfEvents, boolean afterConditionSatisfied, OutputProcessViewConditionFactory parent, AgentInstanceContext agentInstanceContext, OutputStrategyPostProcess postProcessor) {
super(resultSetProcessor, afterConditionTime, afterConditionNumberOfEvents, afterConditionSatisfied, parent, agentInstanceContext);
this.postProcessor = postProcessor;
}
public void output(boolean forceUpdate, UniformPair<EventBean[]> results)
{
// Child view can be null in replay from named window
if (childView != null)
{
postProcessor.output(forceUpdate, results, childView);
}
}
}