|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.rule.SlidingLengthWindow
public class SlidingLengthWindow
A length window behavior implementation
Nested Class Summary | |
---|---|
static class |
SlidingLengthWindow.SlidingLengthWindowContext
A Context object for length windows |
Nested classes/interfaces inherited from interface org.drools.rule.Behavior |
---|
Behavior.BehaviorType |
Field Summary |
---|
Fields inherited from interface org.drools.rule.Behavior |
---|
EMPTY_BEHAVIOR_LIST |
Constructor Summary | |
---|---|
SlidingLengthWindow()
|
|
SlidingLengthWindow(int size)
|
Method Summary | |
---|---|
boolean |
assertRightTuple(PropagationContext pctx,
Object context,
RightTuple rightTuple,
InternalWorkingMemory workingMemory)
Makes the behavior aware of the new fact entering behavior's scope |
Object |
createContext()
Creates the context object associated with this behavior. |
void |
expireTuples(Object context,
InternalWorkingMemory workingMemory)
A callback method that allows behaviors to expire tuples |
long |
getExpirationOffset()
Length windows don't change expiration offset, so always return -1 |
long |
getSize()
|
Behavior.BehaviorType |
getType()
Returns the type of the behavior |
void |
readExternal(ObjectInput in)
|
void |
retractRightTuple(Object context,
RightTuple rightTuple,
InternalWorkingMemory workingMemory)
Removes a right tuple from the behavior's scope |
void |
setSize(int size)
|
String |
toString()
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SlidingLengthWindow()
public SlidingLengthWindow(int size)
size
- Method Detail |
---|
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Externalizable.readExternal(java.io.ObjectInput)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
Externalizable.writeExternal(java.io.ObjectOutput)
public Behavior.BehaviorType getType()
Behavior
getType
in interface Behavior
public long getSize()
public void setSize(int size)
size
- the size to setpublic Object createContext()
Behavior
createContext
in interface Behavior
public boolean assertRightTuple(PropagationContext pctx, Object context, RightTuple rightTuple, InternalWorkingMemory workingMemory)
Behavior
assertRightTuple
in interface Behavior
context
- The behavior context objectrightTuple
- The new fact entering behavior's scopeworkingMemory
- The working memory session reference
org.drools.rule.Behavior#assertRightTuple(java.lang.Object, org.drools.reteoo.RightTuple, org.drools.common.InternalWorkingMemory)
public void retractRightTuple(Object context, RightTuple rightTuple, InternalWorkingMemory workingMemory)
Behavior
retractRightTuple
in interface Behavior
context
- The behavior context objectrightTuple
- The tuple leaving the behavior's scopeworkingMemory
- The working memory session referenceBehavior.retractRightTuple(java.lang.Object, org.drools.reteoo.RightTuple, org.drools.common.InternalWorkingMemory)
public void expireTuples(Object context, InternalWorkingMemory workingMemory)
Behavior
expireTuples
in interface Behavior
context
- The behavior context objectworkingMemory
- The working memory session referencepublic long getExpirationOffset()
getExpirationOffset
in interface Behavior
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |