|
||||||||||
| 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 |
assertFact(WindowNode.WindowMemory memory,
Object context,
InternalFactHandle handle,
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 |
expireFacts(WindowNode.WindowMemory memory,
Object context,
InternalWorkingMemory workingMemory)
A callback method that allows behaviors to expire facts |
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 |
retractFact(WindowNode.WindowMemory memory,
Object context,
InternalFactHandle handle,
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 ExternalizableIOException
ClassNotFoundExceptionExternalizable.readExternal(java.io.ObjectInput)
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOExceptionExternalizable.writeExternal(java.io.ObjectOutput)public Behavior.BehaviorType getType()
Behavior
getType in interface Behaviorpublic long getSize()
public void setSize(int size)
size - the size to setpublic Object createContext()
Behavior
createContext in interface Behavior
public boolean assertFact(WindowNode.WindowMemory memory,
Object context,
InternalFactHandle handle,
InternalWorkingMemory workingMemory)
Behavior
assertFact in interface Behaviormemory - The window node memorycontext - The behavior context objecthandle - The new fact entering behavior's scopeworkingMemory - The working memory session reference
public void retractFact(WindowNode.WindowMemory memory,
Object context,
InternalFactHandle handle,
InternalWorkingMemory workingMemory)
Behavior
retractFact in interface Behaviormemory - The window node memorycontext - The behavior context objecthandle - The fact leaving the behavior's scopeworkingMemory - The working memory session referenceorg.drools.rule.Behavior#retractRightTuple(java.lang.Object, org.drools.reteoo.RightTuple, org.drools.common.InternalWorkingMemory)
public void expireFacts(WindowNode.WindowMemory memory,
Object context,
InternalWorkingMemory workingMemory)
Behavior
expireFacts in interface Behaviormemory - The window node memorycontext - The behavior context objectworkingMemory - The working memory session referencepublic long getExpirationOffset()
getExpirationOffset in interface Behaviorpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||