public class SlidingTimeWindow extends Object implements Externalizable, Behavior
Modifier and Type | Class and Description |
---|---|
static class |
SlidingTimeWindow.BehaviorExpireWMAction |
static class |
SlidingTimeWindow.BehaviorJob |
static class |
SlidingTimeWindow.BehaviorJobContext |
static class |
SlidingTimeWindow.BehaviorJobContextTimerInputMarshaller |
static class |
SlidingTimeWindow.BehaviorJobContextTimerOutputMarshaller |
static class |
SlidingTimeWindow.SlidingTimeWindowContext |
Behavior.BehaviorType
Modifier and Type | Field and Description |
---|---|
static SlidingTimeWindow.BehaviorJob |
job |
EMPTY_BEHAVIOR_LIST
Constructor and Description |
---|
SlidingTimeWindow() |
SlidingTimeWindow(long size) |
Modifier and Type | Method and Description |
---|---|
boolean |
assertFact(WindowNode.WindowMemory memory,
Object context,
InternalFactHandle fact,
PropagationContext pctx,
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,
PropagationContext pctx,
InternalWorkingMemory workingMemory)
A callback method that allows behaviors to expire facts
|
long |
getExpirationOffset()
Some behaviors might change the expiration offset for the
associated fact type.
|
long |
getSize() |
Behavior.BehaviorType |
getType()
Returns the type of the behavior
|
void |
readExternal(ObjectInput in) |
void |
retractFact(WindowNode.WindowMemory memory,
Object context,
InternalFactHandle fact,
PropagationContext pctx,
InternalWorkingMemory workingMemory)
Removes a right tuple from the behavior's scope
|
void |
setSize(long size) |
void |
setWindowNode(WindowNode windowNode) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final SlidingTimeWindow.BehaviorJob job
public SlidingTimeWindow()
public SlidingTimeWindow(long size)
size
- 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
public void setWindowNode(WindowNode windowNode)
public long getSize()
public void setSize(long size)
size
- the size to setpublic Object createContext()
Behavior
createContext
in interface Behavior
public boolean assertFact(WindowNode.WindowMemory memory, Object context, InternalFactHandle fact, PropagationContext pctx, InternalWorkingMemory workingMemory)
Behavior
assertFact
in interface Behavior
memory
- The window node memorycontext
- The behavior context objectfact
- The new fact entering behavior's scopeworkingMemory
- The working memory session referencepublic void retractFact(WindowNode.WindowMemory memory, Object context, InternalFactHandle fact, PropagationContext pctx, InternalWorkingMemory workingMemory)
Behavior
retractFact
in interface Behavior
memory
- The window node memorycontext
- The behavior context objectfact
- The fact leaving the behavior's scopeworkingMemory
- The working memory session referencepublic void expireFacts(WindowNode.WindowMemory memory, Object context, PropagationContext pctx, InternalWorkingMemory workingMemory)
Behavior
expireFacts
in interface Behavior
memory
- The window node memorycontext
- The behavior context objectworkingMemory
- The working memory session referencepublic long getExpirationOffset()
Behavior
getExpirationOffset
in interface Behavior
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.