www.espertech.comDocumentation

Esper Reference

Version 7.0.0


Preface
1. Getting Started
1.1. Introduction to Complex Event Processing
1.2. Steps
1.2.1. Step One: Setting up Classpath
1.2.2. Step Two: Obtain Engine Instance
1.2.3. Step Three: Provide Information on Input Events
1.2.4. Step Four: Create EPL Statements and Attach Callbacks
1.2.5. Step Five: Send Events
1.3. Required 3rd Party Libraries
2. Basic Concepts
2.1. Introduction
2.2. Basic Select
2.3. Basic Aggregation
2.4. Basic Filter
2.5. Basic Filter and Aggregation
2.6. Basic Data Window
2.7. Basic Data Window and Aggregation
2.8. Basic Filter, Data Window and Aggregation
2.9. Basic Where-Clause
2.10. Basic Time Window and Aggregation
2.11. Basic Partitioned Query
2.12. Basic Output-Rate-Limited Query
2.13. Basic Partitioned and Output-Rate-Limited Query
2.14. Basic Named Windows and Tables
2.15. Basic Aggregated Query Types
2.15.1. Un-Aggregated and Un-Grouped
2.15.2. Fully Aggregated and Un-Grouped
2.15.3. Aggregated and Un-Grouped
2.15.4. Fully Aggregated and Grouped
2.15.5. Aggregated and Grouped
2.16. Basic Match-Recognize Patterns
2.17. Basic EPL Patterns
2.18. Basic Indexes
2.18.1. Index Kinds
2.18.2. Filter Indexes
2.18.3. Event Indexes
3. Event Representations
3.1. Event Underlying Java Objects
3.2. Event Properties
3.2.1. Escape Characters
3.2.2. Expression as Key or Index Value
3.3. Dynamic Event Properties
3.4. Fragment and Fragment Type
3.5. Comparing Event Representations
3.5.1. Incoming Events
3.5.2. Outgoing Events
3.5.3. Schema
3.5.4. Side-by-Side
3.6. Support for Generic Tuples
3.7. Additional Event Representations
3.8. Updating, Merging and Versioning Events
3.9. Coarse-Grained Events
3.10. Event Objects Instantiated and Populated by Insert Into
4. Context and Context Partitions
4.1. Introduction
4.2. Context Declaration
4.2.1. Context-Provided Properties
4.2.2. Keyed Segmented Context
4.2.3. Hash Segmented Context
4.2.4. Category Segmented Context
4.2.5. Non-Overlapping Context
4.2.6. Overlapping Context
4.2.7. Context Conditions
4.3. Context Nesting
4.3.1. Nested Context Sample Walk-Through
4.3.2. Built-In Nested Context Properties
4.4. Partitioning Without Context Declaration
4.5. Output When a Context Partition Ends or Terminates
4.6. Context and Named Window
4.7. Context and Tables
4.8. Context and Variables
4.9. Operations on Specific Context Partitions
5. EPL Reference: Clauses
5.1. EPL Introduction
5.2. EPL Syntax
5.2.1. Specifying Time Periods
5.2.2. Using Comments
5.2.3. Reserved Keywords
5.2.4. Escaping Strings
5.2.5. Data Types
5.2.6. Using Constants and Enum Types
5.2.7. Annotation
5.2.8. Expression Alias
5.2.9. Expression Declaration
5.2.10. Script Declaration
5.2.11. Referring to a Context
5.3. Choosing Event Properties and Events: The Select Clause
5.3.1. Choosing the Event Itself: Select *
5.3.2. Choosing Specific Event Properties
5.3.3. Expressions
5.3.4. Renaming Event Properties
5.3.5. Choosing Event Properties and Events in a Join
5.3.6. Choosing Event Properties and Events From a Pattern
5.3.7. Selecting Insert and Remove Stream Events
5.3.8. Qualifying Property Names and Stream Names
5.3.9. Select Distinct
5.3.10. Transposing an Expression Result to a Stream
5.3.11. Selecting EventBean Instead of Underlying Event
5.4. Specifying Event Streams: The From Clause
5.4.1. Filter-Based Event Streams
5.4.2. Pattern-Based Event Streams
5.4.3. Specifying Data Windows
5.4.4. Multiple Data Windows
5.4.5. Using the Stream Name
5.5. Specifying Search Conditions: The Where Clause
5.6. Aggregates and Grouping: The Group-By Clause and the Having Clause
5.6.1. Using Aggregate Functions
5.6.2. Organizing Statement Results into Groups: The Group-by Clause
5.6.3. Using Group-By with Rollup, Cube and Grouping Sets
5.6.4. Specifying Grouping for Each Aggregation Function
5.6.5. Specifying a Filter Expression for Each Aggregation Function
5.6.6. Selecting Groups of Events: The Having Clause
5.6.7. How the Stream Filter, Where, Group By and Having-Clauses Interact
5.6.8. Comparing Keyed Segmented Context, the Group By Clause and #groupwin for Data Windows
5.7. Stabilizing and Controlling Output: The Output Clause
5.7.1. Output Clause Options
5.7.2. Aggregation, Group By, Having and Output Clause Interaction
5.8. Sorting Output: the Order By Clause
5.9. Limiting Row Count: the Limit Clause
5.10. Merging Streams and Continuous Insertion: The Insert Into Clause
5.10.1. Transposing a Property to a Stream
5.10.2. Merging Streams by Event Type
5.10.3. Merging Disparate Types of Events: Variant Streams
5.10.4. Decorated Events
5.10.5. Event as a Property
5.10.6. Instantiating and Populating an Underlying Event Object
5.10.7. Transposing an Expression Result
5.10.8. Select-Clause Expression and Inserted-Into Column Event Type
5.10.9. Insert Into for Event Types Without Properties
5.11. Subqueries
5.11.1. The 'Exists' Keyword
5.11.2. The 'In' and 'Not In' Keywords
5.11.3. The 'Any' and 'Some' Keywords
5.11.4. The 'All' Keyword
5.11.5. Subquery With Group By Clause
5.11.6. Multi-Column Selection
5.11.7. Multi-Row Selection
5.11.8. Hints Related to Subqueries
5.12. Joining Event Streams
5.12.1. Introducing Joins
5.12.2. Inner (Default) Joins
5.12.3. Outer, Left and Right Joins
5.12.4. Unidirectional Joins
5.12.5. Unidirectional Full Outer Joins
5.12.6. Hints Related to Joins
5.13. Accessing Relational Data via SQL
5.13.1. Joining SQL Query Results
5.13.2. SQL Query and the EPL Where Clause
5.13.3. Outer Joins With SQL Queries
5.13.4. Using Patterns to Request (Poll) Data
5.13.5. Polling SQL Queries via Iterator
5.13.6. JDBC Implementation Overview
5.13.7. Oracle Drivers and No-Metadata Workaround
5.13.8. SQL Input Parameter and Column Output Conversion
5.13.9. SQL Row POJO Conversion
5.14. Accessing Non-Relational Data via Method, Script or UDF Invocation
5.14.1. Joining Method, Script or UDF Invocation Results
5.14.2. Polling Invocation Results via Iterator
5.14.3. Providing the Method
5.14.4. Using a Map Return Type
5.14.5. Using a Object Array Return Type
5.14.6. Using an EventBean Return Type
5.14.7. Providing the Script
5.14.8. Providing the UDF
5.15. Declaring an Event Type: Create Schema
5.15.1. Declare an Event Type by Providing Names and Types
5.15.2. Declare an Event Type by Providing a Class Name
5.15.3. Declare a Variant Stream
5.16. Splitting and Duplicating Streams
5.16.1. Generating Marker Events for Contained Events
5.17. Variables and Constants
5.17.1. Creating Variables: The Create Variable Clause
5.17.2. Setting Variable Values: The On Set Clause
5.17.3. Using Variables
5.17.4. Object-Type Variables
5.17.5. Class and Event-Type Variables
5.18. Declaring Global Expressions, Aliases and Scripts: Create Expression
5.18.1. Global Expression Aliases
5.18.2. Global Expression Declarations
5.18.3. Global Scripts
5.19. Contained-Event Selection
5.19.1. Select-Clause in a Contained-Event Selection
5.19.2. Where Clause in a Contained-Event Selection
5.19.3. Contained-Event Selection and Joins
5.19.4. Sentence and Word Example
5.19.5. More Examples
5.19.6. Contained Expression Returning an Array of Property Values
5.19.7. Contained Expression Returning an Array of EventBean
5.19.8. Generating Marker Events Such as a Begin and End Event
5.19.9. Contained-Event Limitations
5.20. Updating an Insert Stream: The Update IStream Clause
5.20.1. Immutability and Updates
5.21. Controlling Event Delivery : The For Clause
6. EPL Reference: Named Windows and Tables
6.1. Overview
6.1.1. Named Window Overview
6.1.2. Table Overview
6.1.3. Comparing Named Windows and Tables
6.2. Named Window Usage
6.2.1. Creating Named Windows: The Create Window clause
6.2.2. Inserting Into Named Windows
6.2.3. Selecting From Named Windows
6.3. Table Usage
6.3.1. Creating Tables: The Create Table Clause
6.3.2. Aggregating Into Table Rows: The Into Table Clause
6.3.3. Table Column Keyed-Access Expressions
6.3.4. Inserting Into Tables
6.3.5. Selecting From Tables
6.4. Triggered Select: The On Select Clause
6.4.1. Notes on On-Select With Named Windows
6.4.2. Notes on On-Select With Tables
6.4.3. On-Select Compared to Join
6.5. Triggered Select+Delete: The On Select Delete Clause
6.6. Updating Data: The On Update Clause
6.6.1. Notes on On-Update With Named Windows
6.6.2. Notes on On-Update With Tables
6.7. Deleting Data: The On Delete Clause
6.7.1. Using Patterns in the On-Delete Clause
6.7.2. Notes on On-Delete With Named Windows
6.7.3. Notes on On-Update With Tables
6.8. Triggered Upsert Using the On-Merge Clause
6.8.1. On-Merge Insert
6.8.2. On-Merge Update, Delete, Select (Upsert)
6.8.3. Notes on On-Merge With Named Windows
6.8.4. Notes on On-Merge With Tables
6.9. Explicitly Indexing Named Windows and Tables
6.10. Using Fire-and-Forget Queries With Named Windows and Tables
6.10.1. Inserting Data
6.10.2. Updating Data
6.10.3. Deleting Data
6.11. Versioning and Revision Event Type Use With Named Windows
6.12. Events as Property
7. EPL Reference: Patterns
7.1. Event Pattern Overview
7.2. How to Use Patterns
7.2.1. Pattern Syntax
7.2.2. Patterns in EPL
7.2.3. Subscribing to Pattern Events
7.2.4. Pulling Data From Patterns
7.2.5. Pattern Error Reporting
7.2.6. Suppressing Same-Event Matches
7.2.7. Discarding Partially Completed Patterns
7.3. Operator Precedence
7.4. Filter Expressions in Patterns
7.4.1. Filter Expressions and Filter Indexes
7.4.2. Controlling Event Consumption
7.4.3. Use With Named Windows and Tables
7.5. Pattern Operators
7.5.1. Every
7.5.2. Every-Distinct
7.5.3. Repeat
7.5.4. Repeat-Until
7.5.5. And
7.5.6. Or
7.5.7. Not
7.5.8. Followed-By
7.5.9. Pattern Guards
7.6. Pattern Atoms
7.6.1. Filter Atoms
7.6.2. Observer Atoms Overview
7.6.3. Interval (timer:interval)
7.6.4. Crontab (timer:at)
7.6.5. Schedule (timer:schedule)
7.7. Event Pattern Walkthrough
8. EPL Reference: Match Recognize
8.1. Overview
8.2. Comparison of Match Recognize and EPL Patterns
8.3. Syntax
8.3.1. Syntax Example
8.4. Pattern and Pattern Operators
8.4.1. Operator Precedence
8.4.2. Concatenation
8.4.3. Alternation
8.4.4. Quantifiers Overview
8.4.5. Permutations
8.4.6. Variables Can Be Singleton or Group
8.4.7. Eliminating Duplicate Matches
8.4.8. Greedy or Reluctant
8.4.9. Quantifier - One or More (+ and +?)
8.4.10. Quantifier - Zero or More (* and *?)
8.4.11. Quantifier - Zero or One (? and ??)
8.4.12. Repetition - Exactly N Matches
8.4.13. Repetition - N or More Matches
8.4.14. Repetition - Between N and M Matches
8.4.15. Repetition - Between Zero and M Matches
8.4.16. Repetition Equivalence
8.5. Define Clause
8.5.1. The Prev Operator
8.6. Measure Clause
8.7. Datawindow-Bound
8.8. Interval
8.9. Interval-or-Terminated
8.10. Use With Different Event Types
8.11. Limiting Engine-Wide State Count
8.12. Limitations
9. EPL Reference: Operators
9.1. Arithmetic Operators
9.2. Logical and Comparison Operators
9.2.1. Null-Value Comparison Operators
9.3. Concatenation Operators
9.4. Binary Operators
9.5. Array Definition Operator
9.6. Dot Operator
9.6.1. Duck Typing
9.7. The 'In' Keyword
9.7.1. 'In' for Range Selection
9.8. The 'Between' Keyword
9.9. The 'Like' Keyword
9.10. The 'Regexp' Keyword
9.11. The 'Any' and 'Some' Keywords
9.12. The 'All' Keyword
9.13. The 'New' Keyword
9.13.1. Using 'New' to Populate a Data Structure
9.13.2. Using 'New' to Instantiate an Object
10. EPL Reference: Functions
10.1. Single-Row Function Reference
10.1.1. The Case Control Flow Function
10.1.2. The Cast Function
10.1.3. The Coalesce Function
10.1.4. The Current_Evaluation_Context Function
10.1.5. The Current_Timestamp Function
10.1.6. The Exists Function
10.1.7. The Grouping Function
10.1.8. The Grouping_Id Function
10.1.9. The Instance-Of Function
10.1.10. The Istream Function
10.1.11. The Min and Max Functions
10.1.12. The Previous Function
10.1.13. The Previous-Tail Function
10.1.14. The Previous-Window Function
10.1.15. The Previous-Count Function
10.1.16. The Prior Function
10.1.17. The Type-Of Function
10.2. Aggregation Functions
10.2.1. SQL-Standard Functions
10.2.2. Event Aggregation Functions
10.2.3. Approximation Aggregation Functions
10.2.4. Additional Aggregation Functions
10.3. User-Defined Functions
10.4. Select-Clause Transpose Function
10.4.1. Transpose with Insert-Into
11. EPL Reference: Enumeration Methods
11.1. Overview
11.2. Example Events
11.3. How to Use
11.3.1. Syntax
11.3.2. Introductory Examples
11.3.3. Input, Output and Limitations
11.4. Inputs
11.4.1. Subquery Results
11.4.2. Named Window
11.4.3. Table
11.4.4. Event Property and Insert-Into With @eventbean
11.4.5. Event Aggregation Function
11.4.6. Prev, Prevwindow and Prevtail Single-Row Functions as Input
11.4.7. Single-Row Function, User-Defined Function and Enum Types
11.4.8. Declared Expression
11.4.9. Variables
11.4.10. Substitution Parameters
11.4.11. Match-Recognize Group Variable
11.4.12. Pattern Repeat and Repeat-Until Operators
11.5. Example
11.6. Reference
11.6.1. Aggregate
11.6.2. AllOf
11.6.3. AnyOf
11.6.4. Average
11.6.5. CountOf
11.6.6. DistinctOf
11.6.7. Except
11.6.8. FirstOf
11.6.9. GroupBy
11.6.10. Intersect
11.6.11. LastOf
11.6.12. LeastFrequent
11.6.13. Max
11.6.14. MaxBy
11.6.15. Min
11.6.16. MinBy
11.6.17. MostFrequent
11.6.18. OrderBy and OrderByDesc
11.6.19. Reverse
11.6.20. SelectFrom
11.6.21. SequenceEqual
11.6.22. SumOf
11.6.23. Take
11.6.24. TakeLast
11.6.25. TakeWhile
11.6.26. TakeWhileLast
11.6.27. ToMap
11.6.28. Union
11.6.29. Where
12. EPL Reference: Date-Time Methods
12.1. Overview
12.2. How to Use
12.2.1. Syntax
12.3. Calendar and Formatting Reference
12.3.1. Between
12.3.2. Format
12.3.3. Get (By Field)
12.3.4. Get (By Name)
12.3.5. Minus
12.3.6. Plus
12.3.7. RoundCeiling
12.3.8. RoundFloor
12.3.9. RoundHalf
12.3.10. Set (By Field)
12.3.11. WithDate
12.3.12. WithMax
12.3.13. WithMin
12.3.14. WithTime
12.3.15. ToCalendar
12.3.16. ToDate
12.3.17. ToMillisec
12.4. Interval Algebra Reference
12.4.1. Examples
12.4.2. Interval Algebra Parameters
12.4.3. Performance
12.4.4. Limitations
12.4.5. After
12.4.6. Before
12.4.7. Coincides
12.4.8. During
12.4.9. Finishes
12.4.10. Finished By
12.4.11. Includes
12.4.12. Meets
12.4.13. Met By
12.4.14. Overlaps
12.4.15. Overlapped By
12.4.16. Starts
12.4.17. Started By
13. EPL Reference: Data Windows
13.1. A Note on Data Window Name and Parameters
13.2. A Note on Batch Windows
13.3. Data Windows
13.3.1. Length Window (length or win:length)
13.3.2. Length Batch Window (length_batch or win:length_batch)
13.3.3. Time Window (time or win:time)
13.3.4. Externally-timed Window (ext_timed or win:ext_timed)
13.3.5. Time batch Window (time_batch or win:time_batch)
13.3.6. Externally-timed Batch Window (ext_timed_batch or win:ext_timed_batch)
13.3.7. Time-Length Combination Batch Window (time_length_batch or win:time_length_batch)
13.3.8. Time-Accumulating Window (time_accum or win:time_accum)
13.3.9. Keep-All Window (keepall or win:keepall)
13.3.10. First Length Window(firstlength or win:firstlength)
13.3.11. First Time Window (firsttime or win:firsttime)
13.3.12. Expiry Expression Window (expr or win:expr)
13.3.13. Expiry Expression Batch Window (expr_batch or win:expr_batch)
13.3.14. Unique Window (unique or std:unique)
13.3.15. Grouped Data Window (groupwin or std:groupwin)
13.3.16. Last Event Window (std:lastevent)
13.3.17. First Event Window (firstevent or std:firstevent)
13.3.18. First Unique Window (firstunique or std:firstunique)
13.3.19. Sorted Window (sort or ext:sort)
13.3.20. Ranked Window (rank or ext:rank)
13.3.21. Time-Order Window (time_order or ext:time_order)
13.3.22. Time-To-Live Window (timetolive or ext:timetolive)
13.4. Special Derived-Value Windows
13.4.1. Size Derived-Value Window (size) or std:size)
13.4.2. Univariate Statistics Derived-Value Window (uni or stat:uni)
13.4.3. Regression Derived-Value Window (linest or stat:linest)
13.4.4. Correlation Derived-Value Window (correl or stat:correl)
13.4.5. Weighted Average Derived-Value Window (weighted_avg or stat:weighted_avg)
14. API Reference
14.1. API Overview
14.2. The Service Provider Interface
14.3. The Administrative Interface
14.3.1. Creating Statements
14.3.2. Receiving Statement Results
14.3.3. Setting a Subscriber Object
14.3.4. Adding Listeners
14.3.5. Using Iterators
14.3.6. Managing Statements
14.3.7. Atomic Statement Management
14.3.8. Runtime Configuration
14.4. The Runtime Interface
14.4.1. Event Sender
14.4.2. Receiving Unmatched Events
14.5. On-Demand Fire-and-Forget Query Execution
14.5.1. On-Demand Query Single Execution
14.5.2. On-Demand Query Prepared Unparameterized Execution
14.5.3. On-Demand Query Prepared Parameterized Execution
14.6. Event and Event Type
14.6.1. Event Type Metadata
14.6.2. Event Object
14.6.3. Query Example
14.6.4. Pattern Example
14.7. Engine Threading and Concurrency
14.7.1. Advanced Threading
14.7.2. Processing Order
14.8. Controlling Time-Keeping
14.8.1. Controlling Time Using Time Span Events
14.8.2. Time Resolution and Time Unit
14.8.3. Internal Timer Based on JVM System Time
14.8.4. Additional Time-Related APIs
14.9. Service Isolation
14.9.1. Overview
14.9.2. Example: Suspending a Statement
14.9.3. Example: Catching Up a Statement From Historical Data
14.9.4. Isolation for Insert-Into
14.9.5. Isolation for Named Windows and Tables
14.9.6. Runtime Considerations
14.10. Exception Handling
14.11. Condition Handling
14.12. Statement Object Model
14.12.1. Building an Object Model
14.12.2. Building Expressions
14.12.3. Building a Pattern Statement
14.12.4. Building a Select Statement
14.12.5. Building a Create-Variable and On-Set Statement
14.12.6. Building Create-Window, On-Delete and On-Select Statements
14.13. Prepared Statement and Substitution Parameters
14.14. Engine and Statement Metrics Reporting
14.14.1. Engine Metrics
14.14.2. Statement Metrics
14.15. Event Rendering to XML and JSON
14.15.1. JSON Event Rendering Conventions and Options
14.15.2. XML Event Rendering Conventions and Options
14.16. Plug-In Loader
14.17. Interrogating EPL Annotations
14.18. Context Partition Selection
14.18.1. Selectors
14.19. Context Partition Administration
14.20. Test and Assertion Support
14.20.1. EPAssertionUtil Summary
14.20.2. SupportUpdateListener Summary
14.20.3. Usage Example
14.21. OSGi, Class Loader, Class-For-Name
15. Configuration
15.1. Programmatic Configuration
15.2. Configuration via XML File
15.3. Passing Services or Transient Objects
15.3.1. Service Example
15.3.2. Class-for-Name
15.3.3. Class Loader
15.3.4. Class Loader CGLib FastClass
15.4. Configuration Items
15.4.1. Events Represented by Java Classes
15.4.2. Events Represented by java.util.Map
15.4.3. Events Represented by Object[] (Object-array)
15.4.4. Events Represented by Avro GenericData.Record
15.4.5. Events Represented by org.w3c.dom.Node
15.4.6. Events Represented by Plug-in Event Representations
15.4.7. Class and Package Imports
15.4.8. Annotation Class and Package Imports
15.4.9. Cache Settings for From-Clause Method Invocations
15.4.10. Variables
15.4.11. Relational Database Access
15.4.12. Engine Settings Related to Byte Code Generation and Compilation
15.4.13. Engine Settings Related to Concurrency and Threading
15.4.14. Engine Settings Related to Event Metadata
15.4.15. Engine Settings Related to View Resources
15.4.16. Engine Settings Related to Logging
15.4.17. Engine Settings Related to Variables
15.4.18. Engine Settings Related to Patterns
15.4.19. Engine Settings Related to Match-Recognize
15.4.20. Engine Settings Related to Scripts
15.4.21. Engine Settings Related to Stream Selection
15.4.22. Engine Settings Related to Time Source
15.4.23. Engine Settings Related to JMX Metrics
15.4.24. Engine Settings Related to Metrics Reporting
15.4.25. Engine Settings Related to Language and Locale
15.4.26. Engine Settings Related to Expression Evaluation
15.4.27. Engine Settings Related to Execution of Statements
15.4.28. Engine Settings Related to Exception Handling
15.4.29. Engine Settings Related to Condition Handling
15.4.30. Revision Event Type
15.4.31. Variant Stream
15.5. Type Names
15.6. Runtime Configuration
15.7. Logging Configuration
15.7.1. Log4j Logging Configuration
16. Development Lifecycle
16.1. Authoring
16.2. Testing
16.3. Debugging
16.3.1. @Audit Annotation
16.4. Packaging and Deploying Overview
16.5. EPL Modules
16.6. The Deployment Administrative Interface
16.6.1. Reading Module Content
16.6.2. Ordering Multiple Modules
16.6.3. Deploying and Un-Deploying
16.6.4. Listing Deployments
16.6.5. State Transitioning a Module
16.6.6. Best Practices
16.7. J2EE Packaging and Deployment
16.7.1. J2EE Deployment Considerations
16.7.2. Servlet Context Listener
16.8. Monitoring and JMX
17. Integration and Extension
17.1. Overview
17.2. Virtual Data Window
17.2.1. How to Use
17.2.2. Implementing the Factory
17.2.3. Implementing the Virtual Data Window
17.2.4. Implementing the Lookup
17.3. Single-Row Function
17.3.1. Implementing a Single-Row Function
17.3.2. Configuring the Single-Row Function Name
17.3.3. Value Cache
17.3.4. Single-Row Functions in Filter Predicate Expressions
17.3.5. Single-Row Functions Taking Events as Parameters
17.3.6. Single-Row Functions Returning Events
17.3.7. Receiving a Context Object
17.3.8. Exception Handling
17.4. Derived-Value and Data Window View
17.4.1. Implementing a View Factory
17.4.2. Implementing a View
17.4.3. View Contract
17.4.4. Configuring View Namespace and Name
17.4.5. Requirement for Data Window Views
17.4.6. Requirement for Derived-Value Views
17.4.7. Requirement for Grouped Views
17.5. Aggregation Function
17.5.1. Aggregation Single-Function Development
17.5.2. Aggregation Multi-Function Development
17.6. Pattern Guard
17.6.1. Implementing a Guard Factory
17.6.2. Implementing a Guard Class
17.6.3. Configuring Guard Namespace and Name
17.7. Pattern Observer
17.7.1. Implementing an Observer Factory
17.7.2. Implementing an Observer Class
17.7.3. Configuring Observer Namespace and Name
17.8. Event Type and Event Object
17.8.1. How It Works
17.8.2. Steps
17.8.3. URI-Based Resolution
17.8.4. Example
18. Script Support
18.1. Overview
18.2. Syntax
18.3. Examples
18.4. Built-In EPL Script Attributes
18.5. Performance Notes
18.6. Additional Notes
19. EPL Reference: Spatial Methods and Indexes
19.1. Overview
19.2. Spatial Methods
19.2.1. Point-Inside-Rectangle
19.2.2. Rectangle-Intersects-Rectangle
19.3. Spatial Index - Quadtree
19.3.1. Overview
19.3.2. Declaring a Point-Region Quadtree Index
19.3.3. Using a Point-Region Quadtree as a Filter Index
19.3.4. Using a Point-Region Quadtree as an Event Index
19.3.5. Declaring a MX-CIF Quadtree Index
19.3.6. Using a MX-CIF Quadtree as a Filter Index
19.3.7. Using a MX-CIF Quadtree as an Event Index
19.4. Spatial Types, Functions and Methods from External Libraries
20. EPL Reference: Data Flow
20.1. Introduction
20.2. Usage
20.2.1. Overview
20.2.2. Syntax
20.3. Built-In Operators
20.3.1. BeaconSource
20.3.2. EPStatementSource
20.3.3. EventBusSink
20.3.4. EventBusSource
20.3.5. Filter
20.3.6. LogSink
20.3.7. Select
20.4. API
20.4.1. Declaring a Data Flow
20.4.2. Instantiating a Data Flow
20.4.3. Executing a Data Flow
20.4.4. Instantiation Options
20.4.5. Start Captive
20.4.6. Data Flow Punctuation With Markers
20.4.7. Exception Handling
20.5. Examples
20.6. Operator Implementation
20.6.1. Sample Operator Acting as Source
20.6.2. Sample Tokenizer Operator
20.6.3. Sample Aggregator Operator
21. Examples, Tutorials, Case Studies
21.1. Examples Overview
21.2. Running the Examples
21.3. AutoID RFID Reader
21.4. Runtime Configuration
21.5. JMS Server Shell and Client
21.5.1. Overview
21.5.2. JMS Messages as Events
21.5.3. JMX for Remote Dynamic Statement Management
21.6. Market Data Feed Monitor
21.6.1. Input Events
21.6.2. Computing Rates per Feed
21.6.3. Detecting a Fall-Off
21.6.4. Event generator
21.7. OHLC Plug-In Data Window
21.8. Transaction 3-Event Challenge
21.8.1. The Events
21.8.2. Combined Event
21.8.3. Real-Time Summary Data
21.8.4. Find Problems
21.8.5. Event Generator
21.9. Self-Service Terminal
21.9.1. Events
21.9.2. Detecting Customer Check-In Issues
21.9.3. Absence of Status Events
21.9.4. Activity Summary Data
21.9.5. Sample Application for J2EE Application Server
21.10. Assets Moving Across Zones - An RFID Example
21.11. StockTicker
21.12. MatchMaker
21.13. Named Window Query
21.14. Sample Virtual Data Window
21.15. Sample Cycle Detection
21.16. Quality of Service
21.17. Trivia Geeks Club
22. Byte Code Generation
22.1. Introduction
22.2. Usage Notes
22.2.1. Criteria
22.2.2. Fallback
22.2.3. Logging
22.2.4. Debugging Generated Code
23. Performance
23.1. Performance Results
23.2. Performance Tips
23.2.1. Understand How to Tune Your Java Virtual Machine
23.2.2. Input and Output Bottlenecks
23.2.3. Theading
23.2.4. Select the Underlying Event Rather Than Individual Fields
23.2.5. Prefer Stream-Level Filtering Over Where-Clause Filtering
23.2.6. Reduce the Use of Arithmetic in Expressions
23.2.7. Remove Unneccessary Constructs
23.2.8. End Pattern Sub-Expressions
23.2.9. Consider Using EventPropertyGetter for Fast Access to Event Properties
23.2.10. Consider Casting the Underlying Event
23.2.11. Turn Off Logging and Audit
23.2.12. Tune or Disable Delivery Order Guarantees
23.2.13. Use a Subscriber Object to Receive Events
23.2.14. Consider Data Flows
23.2.15. High-Arrival-Rate Streams and Single Statements
23.2.16. Subqueries Versus Joins and Where-Clause and Data Windows
23.2.17. Patterns and Pattern Sub-Expression Instances
23.2.18. Pattern Sub-Expression Instance Versus Data Window Use
23.2.19. The Keep-All Data Window
23.2.20. Statement Design for Reduced Memory Consumption - Diagnosing OutOfMemoryError
23.2.21. Performance, JVM, OS and Hardware
23.2.22. Consider Using Hints
23.2.23. Optimizing Stream Filter Expressions
23.2.24. Statement and Engine Metric Reporting
23.2.25. Expression Evaluation Order and Early Exit
23.2.26. Large Number of Threads
23.2.27. Filter Evaluation Tuning
23.2.28. Context Partition Related Information
23.2.29. Prefer Constant Variables Over Non-Constant Variables
23.2.30. Prefer Object-Array Events
23.2.31. Composite or Compound Keys
23.2.32. Notes on Query Planning
23.2.33. Query Planning Expression Analysis Hints
23.2.34. Query Planning Index Hints
23.2.35. Measuring Throughput
23.2.36. Do Not Create the Same or Similar EPL Statement X Times
23.2.37. Comparing Single-Threaded and Multi-Threaded Performance
23.2.38. Incremental Versus Recomputed Aggregation for Named Window Events
23.2.39. When Does Memory Get Released
23.2.40. Measure throughput of non-matches as well as matches
23.3. Using the Performance Kit
23.3.1. How to Use the Performance Kit
24. References
24.1. Reference List
A. Output Reference and Samples
A.1. Introduction and Sample Data
A.2. Output for Un-Aggregated and Un-Grouped Queries
A.2.1. No Output Rate Limiting
A.2.2. Output Rate Limiting - Default
A.2.3. Output Rate Limiting - Last
A.2.4. Output Rate Limiting - First
A.2.5. Output Rate Limiting - Snapshot
A.3. Output for Fully-Aggregated and Un-Grouped Queries
A.3.1. No Output Rate Limiting
A.3.2. Output Rate Limiting - Default
A.3.3. Output Rate Limiting - Last
A.3.4. Output Rate Limiting - First
A.3.5. Output Rate Limiting - Snapshot
A.4. Output for Aggregated and Un-Grouped Queries
A.4.1. No Output Rate Limiting
A.4.2. Output Rate Limiting - Default
A.4.3. Output Rate Limiting - Last
A.4.4. Output Rate Limiting - First
A.4.5. Output Rate Limiting - Snapshot
A.5. Output for Fully-Aggregated and Grouped Queries
A.5.1. No Output Rate Limiting
A.5.2. Output Rate Limiting - Default
A.5.3. Output Rate Limiting - All
A.5.4. Output Rate Limiting - Last
A.5.5. Output Rate Limiting - First
A.5.6. Output Rate Limiting - Snapshot
A.6. Output for Aggregated and Grouped Queries
A.6.1. No Output Rate Limiting
A.6.2. Output Rate Limiting - Default
A.6.3. Output Rate Limiting - All
A.6.4. Output Rate Limiting - Last
A.6.5. Output Rate Limiting - First
A.6.6. Output Rate Limiting - Snapshot
A.7. Output for Fully-Aggregated, Grouped Queries With Rollup
A.7.1. No Output Rate Limiting
A.7.2. Output Rate Limiting - Default
A.7.3. Output Rate Limiting - All
A.7.4. Output Rate Limiting - Last
A.7.5. Output Rate Limiting - First
A.7.6. Output Rate Limiting - Snapshot
B. Runtime Considerations for Output Rate Limiting
B.1. For Un-Aggregated and Un-Grouped Queries
B.1.1. Output Last
B.1.2. Output All
B.2. For Fully Aggregated and Un-Grouped Queries
B.2.1. Output Last
B.2.2. Output All
B.3. For Aggregated and Un-Grouped Queries
B.3.1. Output Last
B.3.2. Output All
B.4. For Fully Aggregated and Grouped Queries (Includes Rollup)
B.4.1. Output Last
B.4.2. Output All
B.5. For Aggregated and Grouped Queries
B.5.1. Output Last
B.5.2. Output All
C. Reserved Keywords
D. Event Representation: Plain-Old Java Object Events
D.1. Overview
D.2. Java Object Event Properties
D.3. Property Names
D.4. Parameterized Types
D.5. Setter Methods for Indexed and Mapped Properties
D.6. Known Limitations
E. Event Representation: java.util.Map Events
E.1. Overview
E.2. Map Properties
E.3. Map Supertypes
E.4. Advanced Map Property Types
E.4.1. Nested Properties
E.4.2. One-to-Many Relationships
F. Event Representation: Object-Array (Object[]) Events
F.1. Overview
F.2. Object-Array Properties
F.3. Object-Array Supertype
F.4. Advanced Object-Array Property Types
F.4.1. Nested Properties
F.4.2. One-to-Many Relationships
G. Event Representation: Avro Events (org.apache.avro.generic.GenericData.Record)
G.1. Overview
G.2. Avro Event Type
G.3. Avro Schema Name Requirement
G.4. Avro Field Schema to Property Type Mapping
G.5. Primitive Data Type and Class to Avro Schema Mapping
G.6. Customizing Avro Schema Assignment
G.7. Customizing Class-to-Avro Schema
G.8. Customizing Object-to-Avro Field Value Assignment
G.9. API Examples
G.10. Limitations
H. Event Representation: org.w3c.dom.Node XML Events
H.1. Overview
H.2. Schema-Provided XML Events
H.2.1. Getting Started
H.2.2. Property Expressions and Namespaces
H.2.3. Property Expression to XPath Rewrite
H.2.4. Array Properties
H.2.5. Dynamic Properties
H.2.6. Transposing Properties
H.2.7. Event Sender
H.2.8. Limitations
H.3. No-Schema-Provided XML Events
H.4. Explicitly-Configured Properties
H.4.1. Simple Explicit Property
H.4.2. Explicit Property Casting and Parsing
H.4.3. Node and Nodeset Explicit Property
I. NEsper .NET -Specific Information
I.1. .NET General Information
I.2. .NET and Annotations
I.3. .NET and Locks and Concurrency
I.4. .NET and Threading
I.5. .NET NEsper Configuration
I.6. .NET Event Underlying Objects
I.7. .NET Object Events
I.8. .NET IDictionary Events
I.9. .NET XML Events
I.10. .NET Event Objects Instantiated and Populated by Insert Into
I.11. .NET Basic Concepts
I.12. .NET EPL Syntax - Data Types
I.13. .NET Accessing Relational Data via SQL
I.14. .NET API - Receiving Statement Results
I.15. .NET API - Adding Listeners
I.16. .NET API - Engine Threading and Concurrency
I.17. .NET Configurations - Relational Database Access
I.18. .NET Configurations - Logging Configuration
Index