當前位置: 首頁>>代碼示例>>Java>>正文


Java EventTableUtil類代碼示例

本文整理匯總了Java中com.espertech.esper.epl.join.table.EventTableUtil的典型用法代碼示例。如果您正苦於以下問題:Java EventTableUtil類的具體用法?Java EventTableUtil怎麽用?Java EventTableUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EventTableUtil類屬於com.espertech.esper.epl.join.table包,在下文中一共展示了EventTableUtil類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: NamedWindowRootViewInstance

import com.espertech.esper.epl.join.table.EventTableUtil; //導入依賴的package包/類
public NamedWindowRootViewInstance(NamedWindowRootView rootView, AgentInstanceContext agentInstanceContext, EventTableIndexMetadata eventTableIndexMetadata) {
    this.rootView = rootView;
    this.agentInstanceContext = agentInstanceContext;

    this.indexRepository = new EventTableIndexRepository(eventTableIndexMetadata);
    for (Map.Entry<IndexMultiKey, EventTableIndexMetadataEntry> entry : eventTableIndexMetadata.getIndexes().entrySet()) {
        if (entry.getValue().getQueryPlanIndexItem() != null) {
            EventTable index = EventTableUtil.buildIndex(agentInstanceContext, 0, entry.getValue().getQueryPlanIndexItem(), rootView.getEventType(), true, entry.getKey().isUnique(), entry.getValue().getOptionalIndexName(), null, false);
            indexRepository.addIndex(entry.getKey(), new EventTableIndexRepositoryEntry(entry.getValue().getOptionalIndexName(), index));
        }
    }

    this.tablePerMultiLookup = new HashMap<SubordWMatchExprLookupStrategy, EventTable[]>();
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:15,代碼來源:NamedWindowRootViewInstance.java

示例2: realizeTables

import com.espertech.esper.epl.join.table.EventTableUtil; //導入依賴的package包/類
public static EventTable[] realizeTables(SubordinateQueryIndexDesc[] indexDescriptors,
                                         EventType eventType,
                                         EventTableIndexRepository indexRepository,
                                         Iterable<EventBean> contents,
                                         AgentInstanceContext agentInstanceContext,
                                         boolean isRecoveringResilient) {
    EventTable[] tables = new EventTable[indexDescriptors.length];
    for (int i = 0; i < tables.length; i++) {
        SubordinateQueryIndexDesc desc = indexDescriptors[i];
        EventTable table = indexRepository.getIndexByDesc(desc.getIndexMultiKey());
        if (table == null) {
            table = EventTableUtil.buildIndex(agentInstanceContext, 0, desc.getQueryPlanIndexItem(), eventType, true, desc.getIndexMultiKey().isUnique(), desc.getIndexName(), null, false);

            // fill table since its new
            if (!isRecoveringResilient) {
                EventBean[] events = new EventBean[1];
                for (EventBean prefilledEvent : contents) {
                    events[0] = prefilledEvent;
                    table.add(events, agentInstanceContext);
                }
            }

            indexRepository.addIndex(desc.getIndexMultiKey(), new EventTableIndexRepositoryEntry(null, table));
        }
        tables[i] = table;
    }
    return tables;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:29,代碼來源:SubordinateQueryPlannerUtil.java

示例3: addIndex

import com.espertech.esper.epl.join.table.EventTableUtil; //導入依賴的package包/類
private Pair<IndexMultiKey, EventTableAndNamePair> addIndex(boolean unique, List<IndexedPropDesc> hashProps, List<IndexedPropDesc> btreeProps, EventAdvancedIndexProvisionDesc advancedIndexProvisionDesc, Iterable<EventBean> prefilledEvents, EventType indexedType, String indexName, boolean mustCoerce, AgentInstanceContext agentInstanceContext, Object optionalSerde) {

        // not resolved as full match and not resolved as unique index match, allocate
        IndexMultiKey indexPropKey = new IndexMultiKey(unique, hashProps, btreeProps, advancedIndexProvisionDesc == null ? null : advancedIndexProvisionDesc.getIndexDesc());

        IndexedPropDesc[] indexedPropDescs = hashProps.toArray(new IndexedPropDesc[hashProps.size()]);
        String[] indexProps = IndexedPropDesc.getIndexProperties(indexedPropDescs);
        Class[] indexCoercionTypes = IndexedPropDesc.getCoercionTypes(indexedPropDescs);
        if (!mustCoerce) {
            indexCoercionTypes = null;
        }

        IndexedPropDesc[] rangePropDescs = btreeProps.toArray(new IndexedPropDesc[btreeProps.size()]);
        String[] rangeProps = IndexedPropDesc.getIndexProperties(rangePropDescs);
        Class[] rangeCoercionTypes = IndexedPropDesc.getCoercionTypes(rangePropDescs);

        QueryPlanIndexItem indexItem = new QueryPlanIndexItem(indexProps, indexCoercionTypes, rangeProps, rangeCoercionTypes, unique, advancedIndexProvisionDesc);
        EventTable table = EventTableUtil.buildIndex(agentInstanceContext, 0, indexItem, indexedType, true, unique, indexName, optionalSerde, false);

        // fill table since its new
        EventBean[] events = new EventBean[1];
        for (EventBean prefilledEvent : prefilledEvents) {
            events[0] = prefilledEvent;
            table.add(events, agentInstanceContext);
        }

        // add table
        tables.add(table);

        // add index, reference counted
        tableIndexesRefCount.put(indexPropKey, new EventTableIndexRepositoryEntry(indexName, table));

        return new Pair<IndexMultiKey, EventTableAndNamePair>(indexPropKey, new EventTableAndNamePair(table, indexName));
    }
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:35,代碼來源:EventTableIndexRepository.java

示例4: addIndex

import com.espertech.esper.epl.join.table.EventTableUtil; //導入依賴的package包/類
private Pair<IndexMultiKey, EventTableAndNamePair> addIndex(boolean unique, List<IndexedPropDesc> hashProps, List<IndexedPropDesc> btreeProps, Iterable<EventBean> prefilledEvents, EventType indexedType, String indexName, boolean mustCoerce) {

        // not resolved as full match and not resolved as unique index match, allocate
        IndexMultiKey indexPropKey = new IndexMultiKey(unique, hashProps, btreeProps);

        IndexedPropDesc[] indexedPropDescs = hashProps.toArray(new IndexedPropDesc[hashProps.size()]);
        String[] indexProps = IndexedPropDesc.getIndexProperties(indexedPropDescs);
        Class[] indexCoercionTypes = IndexedPropDesc.getCoercionTypes(indexedPropDescs);
        if (!mustCoerce) {
            indexCoercionTypes = null;
        }

        IndexedPropDesc[] rangePropDescs = btreeProps.toArray(new IndexedPropDesc[btreeProps.size()]);
        String[] rangeProps = IndexedPropDesc.getIndexProperties(rangePropDescs);
        Class[] rangeCoercionTypes = IndexedPropDesc.getCoercionTypes(rangePropDescs);

        QueryPlanIndexItem indexItem = new QueryPlanIndexItem(indexProps, indexCoercionTypes, rangeProps, rangeCoercionTypes, false);
        EventTable table = EventTableUtil.buildIndex(0, indexItem, indexedType, true, unique, indexName);

        // fill table since its new
        EventBean[] events = new EventBean[1];
        for (EventBean prefilledEvent : prefilledEvents)
        {
            events[0] = prefilledEvent;
            table.add(events);
        }

        // add table
        tables.add(table);

        // add index, reference counted
        tableIndexesRefCount.put(indexPropKey, new NamedWindowIndexRepEntry(table, indexName, 1));

        return new Pair<IndexMultiKey, EventTableAndNamePair>(indexPropKey, new EventTableAndNamePair(table, indexName));
    }
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:36,代碼來源:NamedWindowIndexRepository.java


注:本文中的com.espertech.esper.epl.join.table.EventTableUtil類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。