本文整理汇总了Java中com.espertech.esper.client.EventBean.equals方法的典型用法代码示例。如果您正苦于以下问题:Java EventBean.equals方法的具体用法?Java EventBean.equals怎么用?Java EventBean.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.espertech.esper.client.EventBean
的用法示例。
在下文中一共展示了EventBean.equals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeEventFromState
import com.espertech.esper.client.EventBean; //导入方法依赖的package包/类
public static List<RegexNFAStateEntry> removeEventFromState(EventBean oldEvent, Iterator<RegexNFAStateEntry> states) {
List<RegexNFAStateEntry> keepList = new ArrayList<RegexNFAStateEntry>();
for (; states.hasNext(); ) {
RegexNFAStateEntry entry = states.next();
boolean keep = true;
EventBean[] state = entry.getEventsPerStream();
for (EventBean aState : state) {
if (aState != null && aState.equals(oldEvent)) {
keep = false;
break;
}
}
if (keep) {
MultimatchState[] multimatch = entry.getOptionalMultiMatches();
if (multimatch != null) {
for (MultimatchState aMultimatch : multimatch) {
if ((aMultimatch != null) && (aMultimatch.containsEvent(oldEvent))) {
keep = false;
break;
}
}
}
}
if (keep) {
keepList.add(entry);
}
}
return keepList;
}
示例2: add
import com.espertech.esper.client.EventBean; //导入方法依赖的package包/类
public void add(EventBean theEvent, ExprEvaluatorContext exprEvaluatorContext) {
MultiKeyUntyped key = getMultiKey(theEvent);
EventBean existing = propertyIndex.put(key, theEvent);
if (existing != null && !existing.equals(theEvent)) {
throw handleUniqueIndexViolation(organization.getIndexName(), key);
}
}
示例3: add
import com.espertech.esper.client.EventBean; //导入方法依赖的package包/类
public void add(EventBean theEvent, ExprEvaluatorContext exprEvaluatorContext) {
Object key = getKey(theEvent);
EventBean existing = propertyIndex.put(key, theEvent);
if (existing != null && !existing.equals(theEvent)) {
throw PropertyIndexedEventTableUnique.handleUniqueIndexViolation(organization.getIndexName(), key);
}
}
示例4: handleFilterFault
import com.espertech.esper.client.EventBean; //导入方法依赖的package包/类
public boolean handleFilterFault(EventBean theEvent, long version) {
/**
* Handle filter faults such as
* - a) App thread determines event E1 applies to CTX + CP1
* b) Timer thread destroys CP1
* c) App thread processes E1 for CTX allocating CP2, processing E1 for CP2
* d) App thread processes E1 for CP1, filter-faulting and ending up dropping the event for CP1 because of this handler
*
* - a) App thread determines event E1 applies to CTX + CP1
* b) App thread processes E1 for CTX, no action
* c) Timer thread destroys CP1
* d) App thread processes E1 for CP1, filter-faulting and ending up processing E1 into CTX because of this handler
*/
AgentInstanceContext aiCreate = contextControllerInitTerm.getFactory().getFactoryContext().getAgentInstanceContextCreate();
StatementAgentInstanceLock lock = aiCreate.getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock();
lock.acquireWriteLock();
try {
Object key = contextControllerInitTerm.getDistinctKey(theEvent);
EventBean trigger = contextControllerInitTerm.distinctContexts.get(key);
// see if we find that context partition
if (trigger != null) {
// true for we have already handled this event
// false for filter fault
return trigger.equals(theEvent);
}
// not found: evaluate against context
StatementAgentInstanceUtil.evaluateEventForStatement(contextControllerInitTerm.getFactory().getFactoryContext().getServicesContext(),
theEvent, null, Collections.singletonList(new AgentInstance(null, aiCreate, null)));
return true; // we handled the event
} finally {
lock.releaseWriteLock();
}
}
示例5: eventsAreEqualsAllowNull
import com.espertech.esper.client.EventBean; //导入方法依赖的package包/类
public static boolean eventsAreEqualsAllowNull(EventBean first, EventBean second) {
if (first == null) {
return second == null;
}
return second != null && first.equals(second);
}