本文整理汇总了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());
}
}
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例10: getFilterService
import com.espertech.esper.filter.FilterService; //导入依赖的package包/类
public FilterService getFilterService()
{
if (engine == null) {
throw new EPServiceDestroyedException(engineURI);
}
return engine.getServices().getFilterService();
}
示例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");
}
示例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);
}
示例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;
}
示例14: getFilterService
import com.espertech.esper.filter.FilterService; //导入依赖的package包/类
public FilterService getFilterService() {
if (engine == null) {
throw new EPServiceDestroyedException(engineURI);
}
return engine.getServices().getFilterService();
}
示例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();
}