com.espertech.esper.core.service
Class EPStatementHandle

java.lang.Object
  extended by com.espertech.esper.core.service.EPStatementHandle
All Implemented Interfaces:
MetaDefItem, java.io.Serializable

public class EPStatementHandle
extends java.lang.Object
implements MetaDefItem, java.io.Serializable

Class exists once per statement and hold statement resource lock(s).

Use by EPRuntimeImpl for determining callback-statement affinity and locking of statement resources.

See Also:
Serialized Form

Constructor Summary
EPStatementHandle(java.lang.String statementId, java.lang.String statementName, java.lang.String statementText, StatementType statementType, java.lang.String expressionText, boolean hasVariables, StatementMetricHandle metricsHandle, int priority, boolean preemptive, boolean hasTableAccess, MultiMatchHandler multiMatchHandler)
          Ctor.
 
Method Summary
 boolean equals(java.lang.Object otherObj)
           
 java.lang.String getEPL()
           
 InsertIntoLatchFactory getInsertIntoBackLatchFactory()
           
 InsertIntoLatchFactory getInsertIntoFrontLatchFactory()
          Returns the factory for latches in insert-into guaranteed order of delivery.
 StatementMetricHandle getMetricsHandle()
          Returns handle for metrics reporting.
 MultiMatchHandler getMultiMatchHandler()
           
 int getPriority()
          Returns the statement priority.
 java.lang.String getStatementId()
          Returns the statement id.
 java.lang.String getStatementName()
           
 StatementType getStatementType()
           
 int hashCode()
           
 boolean isCanSelfJoin()
          Returns true if the statement potentially self-joins amojng the events it processes.
 boolean isHasTableAccess()
           
 boolean isHasVariables()
          Returns true if the statement uses variables, false if not.
 boolean isPreemptive()
          True for preemptive (drop) statements.
 void setCanSelfJoin(boolean canSelfJoin)
          Set the statement's self-join flag to indicate the the statement may join to itself, that is a single event may dispatch into multiple streams or patterns for the same statement, requiring internal dispatch logic to not shortcut evaluation of all filters for the statement within one lock, requiring the callback handle to be sorted.
 void setInsertIntoBackLatchFactory(InsertIntoLatchFactory insertIntoBackLatchFactory)
           
 void setInsertIntoFrontLatchFactory(InsertIntoLatchFactory insertIntoFrontLatchFactory)
          Sets the factory for latches in insert-into guaranteed order of delivery.
 void setMultiMatchHandler(MultiMatchHandler multiMatchHandler)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EPStatementHandle

public EPStatementHandle(java.lang.String statementId,
                         java.lang.String statementName,
                         java.lang.String statementText,
                         StatementType statementType,
                         java.lang.String expressionText,
                         boolean hasVariables,
                         StatementMetricHandle metricsHandle,
                         int priority,
                         boolean preemptive,
                         boolean hasTableAccess,
                         MultiMatchHandler multiMatchHandler)
Ctor.

Parameters:
statementId - is the statement id uniquely indentifying the handle
expressionText - is the expression
hasVariables - indicator whether the statement uses variables
metricsHandle - handle for metrics reporting
priority - priority, zero is default
preemptive - true for drop after done
Method Detail

setCanSelfJoin

public void setCanSelfJoin(boolean canSelfJoin)
Set the statement's self-join flag to indicate the the statement may join to itself, that is a single event may dispatch into multiple streams or patterns for the same statement, requiring internal dispatch logic to not shortcut evaluation of all filters for the statement within one lock, requiring the callback handle to be sorted.

Parameters:
canSelfJoin - is true if the statement potentially self-joins, false if not

getStatementId

public java.lang.String getStatementId()
Returns the statement id.

Returns:
statement id

setInsertIntoFrontLatchFactory

public void setInsertIntoFrontLatchFactory(InsertIntoLatchFactory insertIntoFrontLatchFactory)
Sets the factory for latches in insert-into guaranteed order of delivery.

Parameters:
insertIntoFrontLatchFactory - latch factory for the statement if it performs insert-into (route) of events

setInsertIntoBackLatchFactory

public void setInsertIntoBackLatchFactory(InsertIntoLatchFactory insertIntoBackLatchFactory)

getInsertIntoFrontLatchFactory

public InsertIntoLatchFactory getInsertIntoFrontLatchFactory()
Returns the factory for latches in insert-into guaranteed order of delivery.

Returns:
latch factory for the statement if it performs insert-into (route) of events

getInsertIntoBackLatchFactory

public InsertIntoLatchFactory getInsertIntoBackLatchFactory()

isHasVariables

public boolean isHasVariables()
Returns true if the statement uses variables, false if not.

Returns:
indicator if variables are used by statement

getPriority

public int getPriority()
Returns the statement priority.

Returns:
priority, default 0

isPreemptive

public boolean isPreemptive()
True for preemptive (drop) statements.

Returns:
preemptive indicator

equals

public boolean equals(java.lang.Object otherObj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isCanSelfJoin

public boolean isCanSelfJoin()
Returns true if the statement potentially self-joins amojng the events it processes.

Returns:
true for self-joins possible, false for not possible (most statements)

getMetricsHandle

public StatementMetricHandle getMetricsHandle()
Returns handle for metrics reporting.

Returns:
handle for metrics reporting

getStatementName

public java.lang.String getStatementName()

getEPL

public java.lang.String getEPL()

getStatementType

public StatementType getStatementType()

isHasTableAccess

public boolean isHasTableAccess()

getMultiMatchHandler

public MultiMatchHandler getMultiMatchHandler()

setMultiMatchHandler

public void setMultiMatchHandler(MultiMatchHandler multiMatchHandler)

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com