当前位置: 首页>>代码示例>>Java>>正文


Java EventBeanUtility.coerce方法代码示例

本文整理汇总了Java中com.espertech.esper.event.EventBeanUtility.coerce方法的典型用法代码示例。如果您正苦于以下问题:Java EventBeanUtility.coerce方法的具体用法?Java EventBeanUtility.coerce怎么用?Java EventBeanUtility.coerce使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.espertech.esper.event.EventBeanUtility的用法示例。


在下文中一共展示了EventBeanUtility.coerce方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context, ArrayList<Object> optionalKeyCollector, CompositeIndexQueryResultPostProcessor postProcessor) {
    Object comparableStart = super.evaluateLookupStart(theEvent, context);
    if (optionalKeyCollector != null) {
        optionalKeyCollector.add(comparableStart);
    }
    if (comparableStart == null) {
        return null;
    }
    Object comparableEnd = super.evaluateLookupEnd(theEvent, context);
    if (optionalKeyCollector != null) {
        optionalKeyCollector.add(comparableEnd);
    }
    if (comparableEnd == null) {
        return null;
    }
    comparableStart = EventBeanUtility.coerce(comparableStart, coercionType);
    comparableEnd = EventBeanUtility.coerce(comparableEnd, coercionType);

    TreeMap index = (TreeMap) parent;
    SortedMap<Object, Set<EventBean>> submapOne = index.headMap(comparableStart, !includeStart);
    SortedMap<Object, Set<EventBean>> submapTwo = index.tailMap(comparableEnd, !includeEnd);
    return CompositeIndexQueryRange.handle(theEvent, submapOne, submapTwo, result, next, postProcessor);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:24,代码来源:CompositeAccessStrategyRangeInverted.java

示例2: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context) {
    Object comparableStart = super.evaluateLookupStart(theEvent, context);
    if (comparableStart == null) {
        return null;
    }
    Object comparableEnd = super.evaluateLookupEnd(theEvent, context);
    if (comparableEnd == null) {
        return null;
    }
    comparableStart = EventBeanUtility.coerce(comparableStart, coercionType);
    comparableEnd = EventBeanUtility.coerce(comparableEnd, coercionType);

    TreeMap index = (TreeMap) parent;
    SortedMap<Object,Set<EventBean>> submapOne = index.headMap(comparableStart, !includeStart);
    SortedMap<Object,Set<EventBean>> submapTwo = index.tailMap(comparableEnd, !includeEnd);
    return CompositeIndexQueryRange.handle(theEvent, submapOne, submapTwo, result, next);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:18,代码来源:CompositeAccessStrategyRangeInverted.java

示例3: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context, ArrayList<Object> optionalKeyCollector, CompositeIndexQueryResultPostProcessor postProcessor) {
    TreeMap index = (TreeMap) parent;
    Object comparable = super.evaluateLookup(theEvent, context);
    if (optionalKeyCollector != null) {
        optionalKeyCollector.add(comparable);
    }
    if (comparable == null) {
        return null;
    }
    comparable = EventBeanUtility.coerce(comparable, coercionType);
    return CompositeIndexQueryRange.handle(theEvent, index.headMap(comparable, true), null, result, next, postProcessor);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:13,代码来源:CompositeAccessStrategyLE.java

示例4: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context, ArrayList<Object> optionalKeyCollector, CompositeIndexQueryResultPostProcessor postProcessor) {
    TreeMap index = (TreeMap) parent;
    Object comparable = super.evaluateLookup(theEvent, context);
    if (optionalKeyCollector != null) {
        optionalKeyCollector.add(comparable);
    }
    if (comparable == null) {
        return null;
    }
    comparable = EventBeanUtility.coerce(comparable, coercionType);
    return CompositeIndexQueryRange.handle(theEvent, index.headMap(comparable), null, result, next, postProcessor);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:13,代码来源:CompositeAccessStrategyLT.java

示例5: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context, ArrayList<Object> optionalKeyCollector, CompositeIndexQueryResultPostProcessor postProcessor) {
    TreeMap index = (TreeMap) parent;
    Object comparable = super.evaluateLookup(theEvent, context);
    if (optionalKeyCollector != null) {
        optionalKeyCollector.add(comparable);
    }
    if (comparable == null) {
        return null;
    }
    comparable = EventBeanUtility.coerce(comparable, coercionType);
    return CompositeIndexQueryRange.handle(theEvent, index.tailMap(comparable, false), null, result, next, postProcessor);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:13,代码来源:CompositeAccessStrategyGT.java

示例6: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context, ArrayList<Object> optionalKeyCollector, CompositeIndexQueryResultPostProcessor postProcessor) {
    Object comparableStart = super.evaluateLookupStart(theEvent, context);
    if (optionalKeyCollector != null) {
        optionalKeyCollector.add(comparableStart);
    }
    if (comparableStart == null) {
        return null;
    }
    Object comparableEnd = super.evaluateLookupEnd(theEvent, context);
    if (optionalKeyCollector != null) {
        optionalKeyCollector.add(comparableEnd);
    }
    if (comparableEnd == null) {
        return null;
    }
    TreeMap index = (TreeMap) parent;
    comparableStart = EventBeanUtility.coerce(comparableStart, coercionType);
    comparableEnd = EventBeanUtility.coerce(comparableEnd, coercionType);

    SortedMap<Object, Set<EventBean>> submap;
    try {
        submap = index.subMap(comparableStart, includeStart, comparableEnd, includeEnd);
    } catch (IllegalArgumentException ex) {
        if (allowReverseRange) {
            submap = index.subMap(comparableEnd, includeStart, comparableStart, includeEnd);
        } else {
            return null;
        }
    }

    return CompositeIndexQueryRange.handle(theEvent, submap, null, result, next, postProcessor);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:33,代码来源:CompositeAccessStrategyRangeNormal.java

示例7: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Collection<EventBean> lookup(EventBean[] eventPerStream, Map parent, Collection<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context, ArrayList<Object> optionalKeyCollector, CompositeIndexQueryResultPostProcessor postProcessor) {
    TreeMap index = (TreeMap) parent;
    Object comparable = super.evaluatePerStream(eventPerStream, context);
    if (optionalKeyCollector != null) {
        optionalKeyCollector.add(comparable);
    }
    if (comparable == null) {
        return null;
    }
    comparable = EventBeanUtility.coerce(comparable, coercionType);
    return CompositeIndexQueryRange.handle(eventPerStream, index.tailMap(comparable), null, result, next, postProcessor);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:13,代码来源:CompositeAccessStrategyGE.java

示例8: enter

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public void enter(EventBean theEvent, Map parent) {
    Object sortable = propertyGetter.get(theEvent);

    if (sortable == null) {
        if (nullKeys == null) {
            nullKeys = new HashSet<EventBean>();
        }
        nullKeys.add(theEvent);
        return;
    }

    sortable = EventBeanUtility.coerce(sortable, coercionType);

    // if this is a leaf, enter event
    if (next == null) {
        Map<Object, Set<EventBean>> eventMap = (Map<Object, Set<EventBean>>) parent;

        Set<EventBean> events = eventMap.get(sortable);
        if (events == null) {
            events = new HashSet<EventBean>();
            eventMap.put(sortable, events);
        }
        events.add(theEvent);
    } else {
        Map innerIndex = (Map) parent.get(sortable);
        if (innerIndex == null) {
            innerIndex = new TreeMap();
            parent.put(sortable, innerIndex);
        }
        next.enter(theEvent, innerIndex);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:33,代码来源:CompositeIndexEnterRemoveRange.java

示例9: getKey

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
protected Object getKey(EventBean theEvent) {
    Object keyValue = super.getKey(theEvent);
    if ((keyValue != null) && (!keyValue.getClass().equals(coercionType))) {
        if (keyValue instanceof Number) {
            keyValue = coercer.coerceBoxed((Number) keyValue);
        } else {
            keyValue = EventBeanUtility.coerce(keyValue, coercionType);
        }
    }
    return keyValue;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:12,代码来源:PropertyIndexedEventTableSingleCoerceAdd.java

示例10: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context) {
    TreeMap index = (TreeMap) parent;
    Object comparable = super.evaluateLookup(theEvent, context);
    if (comparable == null) {
        return null;
    }
    comparable = EventBeanUtility.coerce(comparable, coercionType);
    return CompositeIndexQueryRange.handle(theEvent, index.headMap(comparable, true), null, result, next);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:10,代码来源:CompositeAccessStrategyLE.java

示例11: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context) {
    TreeMap index = (TreeMap) parent;
    Object comparable = super.evaluateLookup(theEvent, context);
    if (comparable == null) {
        return null;
    }
    comparable = EventBeanUtility.coerce(comparable, coercionType);
    return CompositeIndexQueryRange.handle(theEvent, index.headMap(comparable), null, result, next);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:10,代码来源:CompositeAccessStrategyLT.java

示例12: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context) {
    TreeMap index = (TreeMap) parent;
    Object comparable = super.evaluateLookup(theEvent, context);
    if (comparable == null) {
        return null;
    }
    comparable = EventBeanUtility.coerce(comparable, coercionType);
    return CompositeIndexQueryRange.handle(theEvent, index.tailMap(comparable, false), null, result, next);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:10,代码来源:CompositeAccessStrategyGT.java

示例13: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context) {
    Object comparableStart = super.evaluateLookupStart(theEvent, context);
    if (comparableStart == null) {
        return null;
    }
    Object comparableEnd = super.evaluateLookupEnd(theEvent, context);
    if (comparableEnd == null) {
        return null;
    }
    TreeMap index = (TreeMap) parent;
    comparableStart = EventBeanUtility.coerce(comparableStart, coercionType);
    comparableEnd = EventBeanUtility.coerce(comparableEnd, coercionType);

    SortedMap<Object,Set<EventBean>> submap;
    try {
        submap = index.subMap(comparableStart, includeStart, comparableEnd, includeEnd);
    }
    catch (IllegalArgumentException ex) {
        if (allowReverseRange) {
            submap = index.subMap(comparableEnd, includeStart, comparableStart, includeEnd);
        }
        else {
            return null;
        }
    }

    return CompositeIndexQueryRange.handle(theEvent, submap, null, result, next);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:29,代码来源:CompositeAccessStrategyRangeNormal.java

示例14: lookup

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context) {
    TreeMap<Object, ?> index = (TreeMap<Object, ?>) parent;
    Object comparable = super.evaluateLookup(theEvent, context);
    if (comparable == null) {
        return null;
    }
    comparable = EventBeanUtility.coerce(comparable, coercionType);
    return CompositeIndexQueryRange.handle(theEvent, index.tailMap(comparable), null, result, next);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:10,代码来源:CompositeAccessStrategyGE.java

示例15: enter

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public void enter(EventBean theEvent, Map parent) {
    Object sortable = propertyGetter.get(theEvent);

    if (sortable == null) {
        if (nullKeys == null) {
            nullKeys = new HashSet<EventBean>();
        }
        nullKeys.add(theEvent);
        return;
    }

    sortable = EventBeanUtility.coerce(sortable, coercionType);

    // if this is a leaf, enter event
    if (next == null) {
        Map<Object, Set<EventBean>> eventMap = (Map<Object, Set<EventBean>>) parent;

        Set<EventBean> events = eventMap.get(sortable);
        if (events == null)
        {
            events = new HashSet<EventBean>();
            eventMap.put(sortable, events);
        }
        events.add(theEvent);
    }
    else {
        Map innerIndex = (Map) parent.get(sortable);
        if (innerIndex == null) {
            innerIndex = new TreeMap();
            parent.put(sortable, innerIndex);
        }
        next.enter(theEvent, innerIndex);
    }
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:35,代码来源:CompositeIndexEnterRemoveRange.java


注:本文中的com.espertech.esper.event.EventBeanUtility.coerce方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。