protected abstract static class EPatternFeed.AbstractMatchFrame extends Object
MatchEvent posted to the subscriber.
Match frames are kept until either an event violates the
pattern or the match completes.
Base class for EOrderPatternFeed.MatchFrame and
EUnorderedPatternFeed.MatchFrame.
| Modifier and Type | Field and Description |
|---|---|
protected List<ENotificationMessage> |
mAllEvents
Contains all events matching the pattern so far.
|
protected boolean |
mIsDefunct
Set to
true when a match frame is 1) used for
an exclusive pattern, 2) the pattern is completely
matched, and 3) this frame contains common events with
the completely matched frame. |
protected boolean |
mIsExclusive
true if this match frame is for an exclusive
pattern. |
protected String |
mPatternName
Match frame created by this pattern.
|
protected Map<Object,Object> |
mUserCache
Cache for storing interim, user-defined data
calculated while performing a
MatchCondition. |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMatchFrame(EPatternFeed.AbstractMatchFrame frame)
Copies the given frame data into this frame.
|
protected |
AbstractMatchFrame(String patternName,
boolean isExclusive)
Creates a new match frame for the given pattern and
exclusivity flag.
|
| Modifier and Type | Method and Description |
|---|---|
List<ENotificationMessage> |
allEvents()
Returns the "all events" collection as an unmodifiable
list.
|
int |
frameId()
Returns the unique match frame identifier.
|
protected abstract Map<String,List<ENotificationMessage>> |
groupMap()
Returns a read-only copy of the group map.
|
boolean |
isDefunct()
Returns
true if this match frame is defunct
due to a prior exclusive matching and, therefore, may
no longer be used. |
boolean |
isExclusive()
Returns
true if this is an exclusive feed;
false otherwise. |
String |
patternName()
Returns the pattern name.
|
void |
setDefunct()
Marks this match frame as defunct.
|
String |
toString() |
Map<Object,Object> |
userCache()
Returns the user-defined match data cache.
|
protected final String mPatternName
protected final List<ENotificationMessage> mAllEvents
protected final Map<Object,Object> mUserCache
MatchCondition.protected final boolean mIsExclusive
true if this match frame is for an exclusive
pattern. That means events may not be used for
multiple matches within the same pattern.protected boolean mIsDefunct
true when a match frame is 1) used for
an exclusive pattern, 2) the pattern is completely
matched, and 3) this frame contains common events with
the completely matched frame. Otherwise, will be
false. Marking a match frame as defunct allows
for "lazy removal" from the frames queue.protected AbstractMatchFrame(String patternName, boolean isExclusive)
patternName - pattern name.isExclusive - true if the pattern is
exclusive.protected AbstractMatchFrame(EPatternFeed.AbstractMatchFrame frame)
frame - copy this frame.protected abstract Map<String,List<ENotificationMessage>> groupMap()
public final String patternName()
public final int frameId()
public final boolean isExclusive()
true if this is an exclusive feed;
false otherwise.true if this is an exclusive feed;public final List<ENotificationMessage> allEvents()
public final Map<Object,Object> userCache()
public final boolean isDefunct()
true if this match frame is defunct
due to a prior exclusive matching and, therefore, may
no longer be used.true if defunct.public final void setDefunct()
Copyright © 2021. All rights reserved.