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, Behavior.Context| Modifier and Type | Field and Description |
|---|---|
protected int |
nodeId |
protected long |
size |
| Constructor and Description |
|---|
SlidingTimeWindow() |
SlidingTimeWindow(long size) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
assertFact(Object context,
InternalFactHandle fact,
PropagationContext pctx,
InternalWorkingMemory workingMemory)
Makes the behavior aware of the new fact entering behavior's scope
|
Behavior.Context |
createContext()
Creates the context object associated with this behavior.
|
void |
expireFacts(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
|
protected boolean |
isExpired(long currentTime,
EventFactHandle handle) |
void |
readExternal(ObjectInput in) |
void |
retractFact(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() |
protected void |
updateNextExpiration(InternalFactHandle fact,
InternalWorkingMemory workingMemory,
Behavior.Context context,
int nodeId) |
void |
writeExternal(ObjectOutput out) |
public SlidingTimeWindow()
public SlidingTimeWindow(long size)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionExternalizable.readExternal(java.io.ObjectInput)public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionExternalizable.writeExternal(java.io.ObjectOutput)public Behavior.BehaviorType getType()
Behaviorpublic void setWindowNode(WindowNode windowNode)
public long getSize()
public void setSize(long size)
size - the size to setpublic Behavior.Context createContext()
BehaviorcreateContext in interface Behaviorpublic boolean assertFact(Object context, InternalFactHandle fact, PropagationContext pctx, InternalWorkingMemory workingMemory)
BehaviorassertFact in interface Behaviorcontext - The behavior context objectfact - The new fact entering behavior's scopeworkingMemory - The working memory session referencepublic void retractFact(Object context, InternalFactHandle fact, PropagationContext pctx, InternalWorkingMemory workingMemory)
BehaviorretractFact in interface Behaviorcontext - The behavior context objectfact - The fact leaving the behavior's scopeworkingMemory - The working memory session referencepublic void expireFacts(Object context, PropagationContext pctx, InternalWorkingMemory workingMemory)
BehaviorexpireFacts in interface Behaviorprotected boolean isExpired(long currentTime,
EventFactHandle handle)
protected void updateNextExpiration(InternalFactHandle fact, InternalWorkingMemory workingMemory, Behavior.Context context, int nodeId)
public long getExpirationOffset()
BehaviorgetExpirationOffset in interface BehaviorCopyright © 2001–2019 JBoss by Red Hat. All rights reserved.