Package com.espertech.esper.epl.expression

Source Code of com.espertech.esper.epl.expression.ExprEvaluatorContextTimeOnly

/**************************************************************************************
* 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.expression;

import com.espertech.esper.client.EventBean;
import com.espertech.esper.core.service.ExpressionResultCacheService;
import com.espertech.esper.epl.script.AgentInstanceScriptContext;
import com.espertech.esper.core.service.StatementAgentInstanceLock;
import com.espertech.esper.schedule.TimeProvider;

/**
* Represents a minimal enginel-level context for expression evaluation, not allowing for agents instances and result cache.
*/
public class ExprEvaluatorContextTimeOnly implements ExprEvaluatorContext
{
    private final TimeProvider timeProvider;
    private final ExpressionResultCacheService expressionResultCacheService;

    public ExprEvaluatorContextTimeOnly(TimeProvider timeProvider) {
        this.timeProvider = timeProvider;
        this.expressionResultCacheService = new ExpressionResultCacheService();
    }

    /**
     * Returns the time provider.
     * @return time provider
     */
    public TimeProvider getTimeProvider() {
        return timeProvider;
    }

    public ExpressionResultCacheService getExpressionResultCacheService() {
        return expressionResultCacheService;
    }

    public int getAgentInstanceId() {
        return -1;
    }

    public EventBean getContextProperties() {
        return null;
    }

    public AgentInstanceScriptContext getAgentInstanceScriptContext() {
        return null;
    }

    public String getStatementName() {
        return null;
    }

    public String getEngineURI() {
        return null;
    }

    public String getStatementId() {
        return null;
    }

    public StatementAgentInstanceLock getAgentInstanceLock() {
        return null;
    }
}
TOP

Related Classes of com.espertech.esper.epl.expression.ExprEvaluatorContextTimeOnly

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.