Package com.espertech.esper.epl.named

Source Code of com.espertech.esper.epl.named.NamedWindowOnMergeActionUpd

package com.espertech.esper.epl.named;

import com.espertech.esper.client.EventBean;
import com.espertech.esper.collection.OneEventCollection;
import com.espertech.esper.epl.expression.ExprEvaluator;
import com.espertech.esper.epl.expression.ExprEvaluatorContext;

public class NamedWindowOnMergeActionUpd extends NamedWindowOnMergeAction {
    private final NamedWindowUpdateHelper updateHelper;

    public NamedWindowOnMergeActionUpd(ExprEvaluator optionalFilter, NamedWindowUpdateHelper updateHelper) {
        super(optionalFilter);
        this.updateHelper = updateHelper;
    }

    public void apply(EventBean matchingEvent, EventBean[] eventsPerStream, OneEventCollection newData, OneEventCollection oldData, ExprEvaluatorContext exprEvaluatorContext) {
        EventBean copy = updateHelper.update(matchingEvent, eventsPerStream, exprEvaluatorContext);
        newData.add(copy);
        oldData.add(matchingEvent);
    }
}
TOP

Related Classes of com.espertech.esper.epl.named.NamedWindowOnMergeActionUpd

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.