esper(4-5)- Context 条件
条件主要包含:Filter,Pattern,Crontab以及Time Period
- Filter主要就是对属性值的过滤,比如:
create context NewUser partition by id from User(id > 10)
Pattern是复杂事件流的代表,比如说“A事件到达后跟着B事件到达”这是一个完整的Pattern。Pattern是Esper里面很特别的东西,并且用它描述复杂的事件流是最合适不过的了。这里暂且不展开说,后面会有专门好几篇来讲解Pattern。
- Crontab是定时任务,主要用于NoOverLapping,就像前面提到的(0, 9, *, *, *),括号里的五项代表分,时,天,月,年。关于这个后面也会有讲解。
- Time Period在这里只有一种表达式,就是after time_period_expression。例如:after 1 minute,after 5 sec。结合Context的例子如下:
// 以0秒为时间初始点,新建一个context,于10秒后开始,1分钟后结束。下一个context从1分20秒开始
create context NonOverlap10SecFor1Min start after 10 seconds end after 1 minute
esper(4-5)- Context 条件的更多相关文章
- Esper系列(三)Context和Group by
Context 把不同的事件按照框的规则框起来(规则框在partition by中定义),并且有可能有多个框,而框与框之间不会互相影响. 功能: 组合事件查询并进行分组,类型:Hash Context ...
- Spring Framework 条件装配 之 @Conditional
Spring Framework 条件装配 之 @Conditional 前言 了解SpringBoot的小伙伴对Conditional注解一定不会陌生,在SpringBoot项目中,Conditio ...
- Esper学习之四:Context
上周末打球实在太累了,就没来得及更新,只是列了个提纲做做准备,发现Context还是有很多内容的.结果也花了不少时间才写完,所以这篇需要各位慢慢消化,并且最好多写几个例子加深理解. 如果有不了解Esp ...
- esper(4-4)-OverLapping Context
语法 create context context_name initiated [by] initiating_condition terminated [by] terminating_condi ...
- esper(4-3)-Non-Overlapping Context
语法 create context context_name start start_condition end end_condition 如: // 9点到17点此context才可用(以引擎的时 ...
- esper(4-1)-简单context
1.创建context语法 create context context_name partition [by] event_property [and event_property [and ... ...
- Entity Framework 6如何进行导航属性的筛选(context.Msg.First(t=>t.Id==1).Include(t=>t.MsgDetail),筛选MsgDetail带条件)
问题: https://q.cnblogs.com/q/98333/ Msg表(Id,Content,IsDel).内有 virtual ICollection<MsgDetail> Ms ...
- esper(4-2)-Category Context
语法: create context context_name group [by] group_expression as category_label [, group [by] group_ex ...
- Esper系列(六)子查询、Exists、In/not in、Any/Some、Join
子查询 1 >= all (select salary from orderEvent.win:length_batch(5))"; 注意: 运行以上三个例句后的结果,刚开始让很费 ...
随机推荐
- Asp.Net程序目录下文件夹或文件操作导致Session失效的解决方案
1.配置web.config <system.web> <sessionState mode="StateServer" stateConnectionStrin ...
- jenkins slave Windows 2008 R2
布置jenkins,添加节点(win2008R2) 配置节点参考: http://www.cnblogs.com/juddhu/archive/2013/07/18/3198191.html 生效la ...
- wp 取消button按下效果
<Style x:Key="ButtonStyle2" TargetType="Button"> <Setter Pro ...
- LSI SAS3008 RAID配置方法
7.1 概述 LSI SAS3008 RAID 控制卡(以下简称LSI SAS3008)是基于Fusion-MPT™ (消息传递技术)架构的8端口12Gbit/s SAS控制器,并采用PCIe3.0 ...
- Oracle动态执行表不可访问
在scott 用户下,执行查询语句是出现"Oracle动态执行表不可访问" 经查,是因为用户权限不够所致,修改scott用户权限语句如下: grant select on V_$s ...
- C#winform拖动无边框窗体
private bool isMouseLeftKeyDown = false; private Point mousePointToClient = new Point();//相对于本窗体鼠标位置 ...
- angular 基本依赖注入
import { Injectable } from '@angular/core'; @Injectable() export class ProductServiceService { const ...
- Dapper ORM
参考地址:https://www.cnblogs.com/lunawzh/p/6607116.html 1.连接语句 var conn = new SqlConnection(Configuratio ...
- 十七、创建一个 WEB 服务器(一)
1.Node.js 创建的第一个应用 var http=require("http") http.createServer(function (req,res) { res.wri ...
- Mybatis 延迟加载策略
延迟加载: 就是在需要用到数据时才进行加载,不需要用到数据时就不加载数据.延迟加载也称懒加载. 好处: 先从单表查询,需要时再从关联表去关联查询,大大提高数据库性能,因为查询单表要比关联查询多张表速 ...