com.espertech.esper.core.service.EPServiceProviderIsolatedImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esper Show documentation
Show all versions of esper Show documentation
Complex event processing and event series analysis component
/*
* *************************************************************************************
* Copyright (C) 2006-2015 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* 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.core.service;
import com.espertech.esper.client.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.util.*;
/**
* Implementation of the isolated service provider.
*/
public class EPServiceProviderIsolatedImpl implements EPServiceProviderIsolatedSPI
{
private static final Log log = LogFactory.getLog(EPServiceProviderIsolatedImpl.class);
private final String name;
private final EPRuntimeIsolatedSPI runtime;
private final EPAdministratorIsolatedImpl admin;
private final EPIsolationUnitServices isolatedServices;
private final Map providers;
/**
* Ctor.
* @param name name of isolated service
* @param isolatedServices filter and scheduling service isolated
* @param unisolatedSvc engine services
* @param providers names and isolated service providers
*/
public EPServiceProviderIsolatedImpl(String name,
EPIsolationUnitServices isolatedServices,
EPServicesContext unisolatedSvc,
Map providers)
{
this.name = name;
this.providers = providers;
this.isolatedServices = isolatedServices;
runtime = unisolatedSvc.getEpRuntimeIsolatedFactory().make(isolatedServices, unisolatedSvc);
admin = new EPAdministratorIsolatedImpl(name, isolatedServices, unisolatedSvc, runtime);
}
public EPIsolationUnitServices getIsolatedServices()
{
return isolatedServices;
}
public EPRuntimeIsolated getEPRuntime()
{
return runtime;
}
public EPAdministratorIsolated getEPAdministrator()
{
return admin;
}
public String getName()
{
return name;
}
public void destroy()
{
providers.remove(name);
admin.removeAllStatements();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy