當前位置: 首頁>>代碼示例>>Java>>正文


Java FilterService類代碼示例

本文整理匯總了Java中com.espertech.esper.filter.FilterService的典型用法代碼示例。如果您正苦於以下問題:Java FilterService類的具體用法?Java FilterService怎麽用?Java FilterService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FilterService類屬於com.espertech.esper.filter包,在下文中一共展示了FilterService類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: dropStream

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
/**
 * See the method of the same name in {@link com.espertech.esper.view.stream.StreamFactoryService}.
 * @param filterSpec is the filter definition
 */
public void dropStream(FilterSpecCompiled filterSpec, FilterService filterService, boolean isJoin, boolean isSubSelect, boolean isNamedWindowTrigger, boolean filterWithSameTypeSubselect, boolean stateless)
{
    Pair<EventStream, EPStatementHandleCallback> pair;
    boolean forceNewStream = isJoin || (!isReuseViews) || isSubSelect || isNamedWindowTrigger || filterWithSameTypeSubselect || stateless;

    if (forceNewStream)
    {
        pair = eventStreamsIdentity.get(filterSpec);
        if (pair == null)
        {
            throw new IllegalStateException("Filter spec object not in collection");
        }
        eventStreamsIdentity.remove(filterSpec);
        filterService.remove(pair.getSecond());
    }
    else
    {
        pair = eventStreamsRefCounted.get(filterSpec);
        boolean isLast = eventStreamsRefCounted.dereference(filterSpec);
        if (isLast)
        {
            filterService.remove(pair.getSecond());
        }
    }
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:30,代碼來源:StreamFactorySvcImpl.java

示例2: startFiltering

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
protected void startFiltering() {
    FilterService filterService = evalFilterNode.getContext().getPatternContext().getFilterService();
    handle = new EPStatementHandleCallback(evalFilterNode.getContext().getAgentInstanceContext().getEpStatementAgentInstanceHandle(), this);
    AgentInstanceContext agentInstanceContext = evalFilterNode.getContext().getAgentInstanceContext();
    FilterValueSet filterValues = evalFilterNode.getFactoryNode().getFilterSpec().getValueSet(beginState, evalFilterNode.getAddendumFilters(), agentInstanceContext, agentInstanceContext.getEngineImportService(), agentInstanceContext.getAnnotations());
    filterServiceEntry = filterService.add(filterValues, handle);
    long filtersVersion = filterService.getFiltersVersion();
    evalFilterNode.getContext().getAgentInstanceContext().getEpStatementAgentInstanceHandle().getStatementFilterVersion().setStmtFilterVersion(filtersVersion);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:10,代碼來源:EvalFilterStateNode.java

示例3: undeployTypes

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
public static List<EventType> undeployTypes(Set<String> referencedTypes, StatementEventTypeRef statementEventTypeRef, EventAdapterService eventAdapterService, FilterService filterService) {
    List<EventType> undeployedTypes = new ArrayList<EventType>();
    for (String typeName : referencedTypes) {

        boolean typeInUse = statementEventTypeRef.isInUse(typeName);
        if (typeInUse) {
            if (log.isDebugEnabled()) {
                log.debug("Event type '" + typeName + "' is in use, not removing type");
            }
            continue;
        }

        if (log.isDebugEnabled()) {
            log.debug("Event type '" + typeName + "' is no longer in use, removing type");
        }
        EventType type = eventAdapterService.getExistsTypeByName(typeName);
        if (type != null) {
            EventTypeSPI spi = (EventTypeSPI) type;
            if (!spi.getMetadata().isApplicationPreConfigured()) {
                eventAdapterService.removeType(typeName);
                undeployedTypes.add(spi);
                filterService.removeType(spi);
            }
        }
    }
    return undeployedTypes;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:28,代碼來源:EPLModuleUtil.java

示例4: EPDeploymentAdminImpl

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
public EPDeploymentAdminImpl(EPAdministratorSPI epService, ManagedReadWriteLock eventProcessingRWLock, DeploymentStateService deploymentStateService, StatementEventTypeRef statementEventTypeRef, EventAdapterService eventAdapterService, StatementIsolationService statementIsolationService, FilterService filterService, TimeZone timeZone, ConfigurationEngineDefaults.ExceptionHandling.UndeployRethrowPolicy undeployRethrowPolicy) {
    this.epService = epService;
    this.eventProcessingRWLock = eventProcessingRWLock;
    this.deploymentStateService = deploymentStateService;
    this.statementEventTypeRef = statementEventTypeRef;
    this.eventAdapterService = eventAdapterService;
    this.statementIsolationService = statementIsolationService;
    this.filterService = filterService;
    this.timeZone = timeZone;
    this.undeployRethrowPolicy = undeployRethrowPolicy;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:12,代碼來源:EPDeploymentAdminImpl.java

示例5: ConfigurationOperationsImpl

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
public ConfigurationOperationsImpl(EventAdapterService eventAdapterService,
                                   EventTypeIdGenerator eventTypeIdGenerator,
                                   EngineImportService engineImportService,
                                   VariableService variableService,
                                   EngineSettingsService engineSettingsService,
                                   ValueAddEventService valueAddEventService,
                                   MetricReportingService metricReportingService,
                                   StatementEventTypeRef statementEventTypeRef,
                                   StatementVariableRef statementVariableRef,
                                   PluggableObjectCollection plugInViews,
                                   FilterService filterService,
                                   PatternSubexpressionPoolEngineSvc patternSubexpressionPoolSvc,
                                   MatchRecognizeStatePoolEngineSvc matchRecognizeStatePoolEngineSvc,
                                   TableService tableService,
                                   Map<String, Object> transientConfiguration) {
    this.eventAdapterService = eventAdapterService;
    this.eventTypeIdGenerator = eventTypeIdGenerator;
    this.engineImportService = engineImportService;
    this.variableService = variableService;
    this.engineSettingsService = engineSettingsService;
    this.valueAddEventService = valueAddEventService;
    this.metricReportingService = metricReportingService;
    this.statementEventTypeRef = statementEventTypeRef;
    this.statementVariableRef = statementVariableRef;
    this.plugInViews = plugInViews;
    this.filterService = filterService;
    this.patternSubexpressionPoolSvc = patternSubexpressionPoolSvc;
    this.matchRecognizeStatePoolEngineSvc = matchRecognizeStatePoolEngineSvc;
    this.tableService = tableService;
    this.transientConfiguration = transientConfiguration;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:32,代碼來源:ConfigurationOperationsImpl.java

示例6: startFiltering

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
protected void startFiltering()
{
    FilterService filterService = evalFilterNode.getContext().getPatternContext().getFilterService();
    handle = new EPStatementHandleCallback(evalFilterNode.getContext().getAgentInstanceContext().getEpStatementAgentInstanceHandle(), this);
    FilterValueSet filterValues = evalFilterNode.getFactoryNode().getFilterSpec().getValueSet(beginState, evalFilterNode.getContext().getAgentInstanceContext(), evalFilterNode.getAddendumFilters());
    filterService.add(filterValues, handle);
    long filtersVersion = filterService.getFiltersVersion();
    evalFilterNode.getContext().getAgentInstanceContext().getEpStatementAgentInstanceHandle().getStatementFilterVersion().setStmtFilterVersion(filtersVersion);
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:10,代碼來源:EvalFilterStateNode.java

示例7: undeployTypes

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
public static List<EventType> undeployTypes(Set<String> referencedTypes, StatementEventTypeRef statementEventTypeRef, EventAdapterService eventAdapterService, FilterService filterService)
{
    List<EventType> undeployedTypes = new ArrayList<EventType>();
    for (String typeName : referencedTypes) {

        boolean typeInUse = statementEventTypeRef.isInUse(typeName);
        if (typeInUse) {
            if (log.isDebugEnabled()) {
                log.debug("Event type '" + typeName + "' is in use, not removing type");
            }
            continue;
        }

        if (log.isDebugEnabled()) {
            log.debug("Event type '" + typeName + "' is no longer in use, removing type");
        }
        EventType type = eventAdapterService.getExistsTypeByName(typeName);
        if (type != null) {
            EventTypeSPI spi = (EventTypeSPI) type;
            if (!spi.getMetadata().isApplicationPreConfigured()) {
                eventAdapterService.removeType(typeName);
                undeployedTypes.add(spi);
                filterService.removeType(spi);
            }
        }
    }
    return undeployedTypes;
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:29,代碼來源:EPLModuleUtil.java

示例8: EPDeploymentAdminImpl

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
/**
 * Ctor.
 * @param epService admininstrative SPI
 * @param deploymentStateService deployment state maintainance service
 * @param statementEventTypeRef maintains statement-eventtype relationship
 * @param eventAdapterService event wrap service
 * @param statementIsolationService for isolated statement execution
 */
public EPDeploymentAdminImpl(EPAdministratorSPI epService, DeploymentStateService deploymentStateService, StatementEventTypeRef statementEventTypeRef, EventAdapterService eventAdapterService, StatementIsolationService statementIsolationService, StatementIdGenerator optionalStatementIdGenerator, FilterService filterService) {
    this.epService = epService;
    this.deploymentStateService = deploymentStateService;
    this.statementEventTypeRef = statementEventTypeRef;
    this.eventAdapterService = eventAdapterService;
    this.statementIsolationService = statementIsolationService;
    this.optionalStatementIdGenerator = optionalStatementIdGenerator;
    this.filterService = filterService;
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:18,代碼來源:EPDeploymentAdminImpl.java

示例9: ConfigurationOperationsImpl

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
/**
 * Ctor.
 * @param eventAdapterService is the event wrapper and type service
 * @param engineImportService for imported aggregation functions and static functions
 * @param variableService - provides access to variable values
 * @param engineSettingsService - some engine settings are writable
 * @param valueAddEventService - update event handling
 * @param metricReportingService - for metric reporting
 * @param statementEventTypeRef - statement to event type reference holding 
 * @param statementVariableRef - statement to variable reference holding 
 */
public ConfigurationOperationsImpl(EventAdapterService eventAdapterService,
                                   EventTypeIdGenerator eventTypeIdGenerator,
                                   EngineImportService engineImportService,
                                   VariableService variableService,
                                   EngineSettingsService engineSettingsService,
                                   ValueAddEventService valueAddEventService,
                                   MetricReportingService metricReportingService,
                                   StatementEventTypeRef statementEventTypeRef,
                                   StatementVariableRef statementVariableRef,
                                   PluggableObjectCollection plugInViews,
                                   FilterService filterService,
                                   PatternSubexpressionPoolEngineSvc patternSubexpressionPoolSvc)
{
    this.eventAdapterService = eventAdapterService;
    this.eventTypeIdGenerator = eventTypeIdGenerator;
    this.engineImportService = engineImportService;
    this.variableService = variableService;
    this.engineSettingsService = engineSettingsService;
    this.valueAddEventService = valueAddEventService;
    this.metricReportingService = metricReportingService;
    this.statementEventTypeRef = statementEventTypeRef;
    this.statementVariableRef = statementVariableRef;
    this.plugInViews = plugInViews;
    this.filterService = filterService;
    this.patternSubexpressionPoolSvc = patternSubexpressionPoolSvc;
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:38,代碼來源:ConfigurationOperationsImpl.java

示例10: getFilterService

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
public FilterService getFilterService()
{
    if (engine == null) {
        throw new EPServiceDestroyedException(engineURI);
    }
    return engine.getServices().getFilterService();
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:8,代碼來源:EPServiceProviderImpl.java

示例11: testCreateSchemaNamedWindowInsert

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
public void testCreateSchemaNamedWindowInsert() throws Exception {

        String text = "module test.test1;\n" +
                "create schema MyTypeOne(col1 string, col2 int);" +
                "create window MyWindowOne.win:keepall() as select * from MyTypeOne;" +
                "insert into MyWindowOne select * from MyTypeOne;";

        DeploymentResult resultOne = deploySvc.parseDeploy(text, "uri1", "arch1", null);
        deploySvc.undeployRemove(resultOne.getDeploymentId());

        DeploymentResult resultTwo = deploySvc.parseDeploy(text, "uri2", "arch2", null);
        deploySvc.undeployRemove(resultTwo.getDeploymentId());
        text = "module test.test1;\n" +
                "create schema MyTypeOne(col1 string, col2 int, col3 long);" +
                "create window MyWindowOne.win:keepall() as select * from MyTypeOne;" +
                "insert into MyWindowOne select * from MyTypeOne;";

        DeploymentResult resultThree = deploySvc.parseDeploy(text, "uri1", "arch1", null);
        deploySvc.undeployRemove(resultThree.getDeploymentId());

        FilterService filterService = ((EPServiceProviderSPI) epService).getFilterService();
        FilterServiceSPI filterSPI = (FilterServiceSPI) filterService;
        assertEquals(0, filterSPI.getCountTypes());

        // test on-merge
        epService.getEPAdministrator().getConfiguration().addEventType(SupportBean.class);
        String moduleString =
            "@Name('S0') create window MyWindow.std:unique(intPrimitive) as SupportBean;\n" +
            "@Name('S1') on MyWindow insert into SecondStream select *;\n" +
            "@Name('S2') on SecondStream merge MyWindow when matched then insert into ThirdStream select * then delete\n";
        Module module = epService.getEPAdministrator().getDeploymentAdmin().parse(moduleString);
        epService.getEPAdministrator().getDeploymentAdmin().deploy(module, null, "myid_101");
        epService.getEPAdministrator().getDeploymentAdmin().undeployRemove("myid_101");
        epService.getEPAdministrator().getDeploymentAdmin().deploy(module, null, "myid_101");
    }
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:36,代碼來源:TestDeployRedefinition.java

示例12: runAssertionCreateSchemaNamedWindowInsert

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
private void runAssertionCreateSchemaNamedWindowInsert(EPServiceProvider epService) throws Exception {

        String text = "module test.test1;\n" +
                "create schema MyTypeOne(col1 string, col2 int);" +
                "create window MyWindowOne#keepall as select * from MyTypeOne;" +
                "insert into MyWindowOne select * from MyTypeOne;";

        DeploymentResult resultOne = epService.getEPAdministrator().getDeploymentAdmin().parseDeploy(text, "uri1", "arch1", null);
        epService.getEPAdministrator().getDeploymentAdmin().undeployRemove(resultOne.getDeploymentId());

        DeploymentResult resultTwo = epService.getEPAdministrator().getDeploymentAdmin().parseDeploy(text, "uri2", "arch2", null);
        epService.getEPAdministrator().getDeploymentAdmin().undeployRemove(resultTwo.getDeploymentId());
        text = "module test.test1;\n" +
                "create schema MyTypeOne(col1 string, col2 int, col3 long);" +
                "create window MyWindowOne#keepall as select * from MyTypeOne;" +
                "insert into MyWindowOne select * from MyTypeOne;";

        DeploymentResult resultThree = epService.getEPAdministrator().getDeploymentAdmin().parseDeploy(text, "uri1", "arch1", null);
        epService.getEPAdministrator().getDeploymentAdmin().undeployRemove(resultThree.getDeploymentId());

        FilterService filterService = ((EPServiceProviderSPI) epService).getFilterService();
        FilterServiceSPI filterSPI = (FilterServiceSPI) filterService;
        assertEquals(0, filterSPI.getCountTypes());

        // test on-merge
        epService.getEPAdministrator().getConfiguration().addEventType(SupportBean.class);
        String moduleString =
                "@Name('S0') create window MyWindow#unique(intPrimitive) as SupportBean;\n" +
                        "@Name('S1') on MyWindow insert into SecondStream select *;\n" +
                        "@Name('S2') on SecondStream merge MyWindow when matched then insert into ThirdStream select * then delete\n";
        Module module = epService.getEPAdministrator().getDeploymentAdmin().parse(moduleString);
        epService.getEPAdministrator().getDeploymentAdmin().deploy(module, null, "myid_101");
        epService.getEPAdministrator().getDeploymentAdmin().undeployRemove("myid_101");
        epService.getEPAdministrator().getDeploymentAdmin().deploy(module, null, "myid_101");

        // test table
        String moduleTableOne = "create table MyTable(c0 string, c1 string)";
        DeploymentResult d = epService.getEPAdministrator().getDeploymentAdmin().parseDeploy(moduleTableOne);
        epService.getEPAdministrator().getDeploymentAdmin().undeployRemove(d.getDeploymentId());
        String moduleTableTwo = "create table MyTable(c0 string, c1 string, c2 string)";
        epService.getEPAdministrator().getDeploymentAdmin().parseDeploy(moduleTableTwo);

        undeployRemoveAll(epService);
    }
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:45,代碼來源:ExecClientDeployRedefinition.java

示例13: StatementContext

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
public StatementContext(StatementContextEngineServices stmtEngineServices,
                        SchedulingService schedulingService,
                        ScheduleBucket scheduleBucket,
                        EPStatementHandle epStatementHandle,
                        ViewResolutionService viewResultionService,
                        PatternObjectResolutionService patternResolutionService,
                        StatementExtensionSvcContext statementExtensionSvcContext,
                        StatementStopService statementStopService,
                        PatternContextFactory patternContextFactory,
                        FilterService filterService,
                        StatementResultService statementResultService,
                        InternalEventRouteDest internalEventEngineRouteDest,
                        Annotation[] annotations,
                        StatementAIResourceRegistry statementAgentInstanceRegistry,
                        StatementAgentInstanceLock defaultAgentInstanceLock,
                        ContextDescriptor contextDescriptor,
                        PatternSubexpressionPoolStmtSvc patternSubexpressionPoolSvc,
                        MatchRecognizeStatePoolStmtSvc matchRecognizeStatePoolStmtSvc,
                        boolean statelessSelect,
                        ContextControllerFactoryService contextControllerFactoryService,
                        AgentInstanceScriptContext defaultAgentInstanceScriptContext,
                        AggregationServiceFactoryService aggregationServiceFactoryService,
                        boolean writesToTables,
                        Object statementUserObject,
                        StatementSemiAnonymousTypeRegistry statementSemiAnonymousTypeRegistry,
                        int priority) {
    this.stmtEngineServices = stmtEngineServices;
    this.schedulingService = schedulingService;
    this.scheduleBucket = scheduleBucket;
    this.epStatementHandle = epStatementHandle;
    this.viewResolutionService = viewResultionService;
    this.patternResolutionService = patternResolutionService;
    this.statementExtensionSvcContext = statementExtensionSvcContext;
    this.statementStopService = statementStopService;
    this.patternContextFactory = patternContextFactory;
    this.filterService = filterService;
    this.statementResultService = statementResultService;
    this.internalEventEngineRouteDest = internalEventEngineRouteDest;
    this.scheduleAdjustmentService = stmtEngineServices.getConfigSnapshot().getEngineDefaults().getExecution().isAllowIsolatedService() ? new ScheduleAdjustmentService() : null;
    this.annotations = annotations;
    this.statementAgentInstanceRegistry = statementAgentInstanceRegistry;
    this.defaultAgentInstanceLock = defaultAgentInstanceLock;
    this.contextDescriptor = contextDescriptor;
    this.patternSubexpressionPoolSvc = patternSubexpressionPoolSvc;
    this.matchRecognizeStatePoolStmtSvc = matchRecognizeStatePoolStmtSvc;
    this.statelessSelect = statelessSelect;
    this.contextControllerFactoryService = contextControllerFactoryService;
    this.defaultAgentInstanceScriptContext = defaultAgentInstanceScriptContext;
    this.aggregationServiceFactoryService = aggregationServiceFactoryService;
    this.writesToTables = writesToTables;
    this.statementUserObject = statementUserObject;
    this.statementSemiAnonymousTypeRegistry = statementSemiAnonymousTypeRegistry;
    this.priority = priority;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:55,代碼來源:StatementContext.java

示例14: getFilterService

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
public FilterService getFilterService() {
    if (engine == null) {
        throw new EPServiceDestroyedException(engineURI);
    }
    return engine.getServices().getFilterService();
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:7,代碼來源:EPServiceProviderImpl.java

示例15: getFilterService

import com.espertech.esper.filter.FilterService; //導入依賴的package包/類
/**
 * Returns service to use for filter evaluation.
 * @return filter evaluation service implemetation
 */
public final FilterService getFilterService()
{
    return statementContext.getFilterService();
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:9,代碼來源:PatternContext.java


注:本文中的com.espertech.esper.filter.FilterService類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。