Class PreparedEventExpressionTemplate
- java.lang.Object
-
- com.apama.jmon.PreparedEventExpressionTemplate
-
- All Implemented Interfaces:
java.io.Serializable
public class PreparedEventExpressionTemplate extends java.lang.Object implements java.io.SerializableInstances of this class are declared to represent templates for "Prepared Event Expressions". These are similar in concept to SQL prepared statements, in that they allow a monitor to declare a parameterised event expression that can then be "instantiated" as many times as necessary with different parameter values. The advantage of this approach over standard event expressions is that the expression is only parsed once, when the template is created. Instantiating the template with some set of parameters is then a relatively cheap operation. Standard event expressions will be parsed every time a listener is attached to them, which can be inefficient in monitors that create large numbers of listeners.
See the documentation for
PreparedEventExpressionfor examples of how this class is used.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PreparedEventExpressionTemplate(java.lang.String templateString)Constructor to create a new instance with the given immutable expression template string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PreparedEventExpressiongetInstance()Create a new instance of the event expression template.java.lang.StringgetTemplateString()Get the String value of the PreparedEventExpressionTemplate.java.lang.StringtoString()
-
-
-
Method Detail
-
getTemplateString
public java.lang.String getTemplateString()
Get the String value of the PreparedEventExpressionTemplate.- Returns:
- value of the PreparedEventExpressionTemplate.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
getTemplateString()
-
getInstance
public PreparedEventExpression getInstance()
Create a new instance of the event expression template.- Returns:
- A new event expression created from the template, ready to have its parameter values filled in.
-
-