Package com.espertech.esper.core.service

Examples of com.espertech.esper.core.service.StatementAgentInstanceLock


        this.removeContextPattern(startEndpoint, path);
    }

    public void startContextPartition(StatementAgentInstanceFactoryResult startResult, int agentInstanceId) {

        StatementAgentInstanceLock lock = startResult.getAgentInstanceContext().getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock();
        StatementResourceHolder recoveryResources = null;

        if (startResult instanceof StatementAgentInstanceFactorySelectResult) {
            StatementAgentInstanceFactorySelectResult selectResult = (StatementAgentInstanceFactorySelectResult) startResult;
            recoveryResources = new StatementResourceHolder(
View Full Code Here


        this.removeContextPattern(startEndpoint, path);
    }

    public void startContextPartition(StatementAgentInstanceFactoryResult startResult, int agentInstanceId) {

        StatementAgentInstanceLock lock = startResult.getAgentInstanceContext().getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock();
        StatementResourceHolder recoveryResources = null;

        if (startResult instanceof StatementAgentInstanceFactorySelectResult) {
            StatementAgentInstanceFactorySelectResult selectResult = (StatementAgentInstanceFactorySelectResult) startResult;
            recoveryResources = new StatementResourceHolder(
View Full Code Here

    public EventBean[] execute(NamedWindowProcessorInstance instance) {
        EventBean event = insertHelper.process(new EventBean[0], true, true, exprEvaluatorContext);
        EventBean[] inserted = new EventBean[] {event};
        AgentInstanceContext ctx = instance.getTailViewInstance().getAgentInstanceContext();
        StatementAgentInstanceLock ailock = ctx.getAgentInstanceLock();
        ailock.acquireWriteLock(null);
        try {
            instance.getRootViewInstance().update(inserted, null);
        }
        catch (EPException ex) {
            instance.getRootViewInstance().update(null, inserted);
        }
        finally {
            ailock.releaseWriteLock(null);
        }
        return inserted;
    }
View Full Code Here

public class AgentInstanceArraySafeIterator extends AgentInstanceArrayIterator implements SafeIterator<EventBean> {

    public AgentInstanceArraySafeIterator(AgentInstance[] instances) {
        super(instances);
        for (int i = 0; i < instances.length; i++) {
            StatementAgentInstanceLock instanceLock = instances[i].getAgentInstanceContext().getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock();
            instanceLock.acquireWriteLock(null);
        }
    }
View Full Code Here

        }
    }

    public void close() {
        for (int i = 0; i < instances.length; i++) {
            StatementAgentInstanceLock instanceLock = instances[i].getAgentInstanceContext().getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock();
            instanceLock.releaseWriteLock(null);
        }
    }
View Full Code Here

TOP

Related Classes of com.espertech.esper.core.service.StatementAgentInstanceLock

Copyright © 2018 www.massapicom. 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.