public abstract class PointInTimeEvaluator extends BaseEvaluator
Modifier and Type | Field and Description |
---|---|
protected long |
finalRange |
protected long |
initRange |
protected String |
paramText |
protected boolean |
unwrapLeft |
protected boolean |
unwrapRight |
Constructor and Description |
---|
PointInTimeEvaluator() |
PointInTimeEvaluator(ValueType type,
Operator operator,
long[] parameters,
String paramText,
boolean unwrapLeft,
boolean unwrapRight) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
evaluate(InternalWorkingMemory workingMemory,
InternalReadAccessor extractor,
InternalFactHandle object1,
FieldValue object2)
Evaluates the expression using the provided parameters.
|
boolean |
evaluate(InternalWorkingMemory workingMemory,
InternalReadAccessor extractor1,
InternalFactHandle handle1,
InternalReadAccessor extractor2,
InternalFactHandle handle2)
Evaluates the expression using the provided parameters.
|
protected abstract boolean |
evaluate(long rightTS,
long leftTS) |
boolean |
evaluateCachedLeft(InternalWorkingMemory workingMemory,
VariableRestriction.VariableContextEntry context,
InternalFactHandle right)
Evaluates the expression using the provided parameters.
|
boolean |
evaluateCachedRight(InternalWorkingMemory workingMemory,
VariableRestriction.VariableContextEntry context,
InternalFactHandle left)
Evaluates the expression using the provided parameters.
|
protected abstract long |
getLeftTimestamp(InternalFactHandle handle) |
protected abstract long |
getRightTimestamp(InternalFactHandle handle) |
int |
hashCode() |
boolean |
isTemporal()
Returns true if this evaluator implements a temporal evaluation,
i.e., a time sensitive evaluation whose properties of matching
only events within an specific time interval can be used for
determining event expirations automatically.
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
getCoercedValueType, getInterval, getOperator, getValueType
protected long initRange
protected long finalRange
protected String paramText
protected boolean unwrapLeft
protected boolean unwrapRight
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class BaseEvaluator
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class BaseEvaluator
IOException
public boolean isTemporal()
Evaluator
isTemporal
in interface org.kie.api.runtime.rule.Evaluator
isTemporal
in class BaseEvaluator
protected abstract boolean evaluate(long rightTS, long leftTS)
protected abstract long getLeftTimestamp(InternalFactHandle handle)
protected abstract long getRightTimestamp(InternalFactHandle handle)
public boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor extractor, InternalFactHandle object1, FieldValue object2)
Evaluator
workingMemory
- The current working memoryextractor
- The extractor used to get the field value from the objectobject1
- The source object to evaluate, i.e., the factobject2
- The actual value to compare to, i.e., the constant value.public boolean evaluateCachedLeft(InternalWorkingMemory workingMemory, VariableRestriction.VariableContextEntry context, InternalFactHandle right)
Evaluator
workingMemory
- The current working memorycontext
- The previously cached context, including the left value
and the extractor for the right value.right
- The right object, from where to extract the value. In the
above example, that is the "Person" instance from where to
extract the "name" attribute.public boolean evaluateCachedRight(InternalWorkingMemory workingMemory, VariableRestriction.VariableContextEntry context, InternalFactHandle left)
Evaluator
workingMemory
- The current working memorycontext
- The previously cached context, including the right value
and the extractor for the left value.left
- The left object, from where to extract the bound variable.
In the above example, that is the "$someName" variable value.public boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor extractor1, InternalFactHandle handle1, InternalReadAccessor extractor2, InternalFactHandle handle2)
Evaluator
workingMemory
- The current working memoryextractor1
- The extractor to read the left value. In the above example,
the "$someName" variable value.handle1
- The source object from where the value of the variable is
extracted.extractor2
- The extractor to read the right value. In the above example,
the "name" attribute value.handle2
- The right object from where to extract the value. In the
above example, that is the "Person" instance from where to
extract the "name" attribute.public int hashCode()
hashCode
in class BaseEvaluator
public boolean equals(Object obj)
equals
in class BaseEvaluator
public String toString()
toString
in class BaseEvaluator
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.