本文整理汇总了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[]>();
}
示例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;
}
示例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));
}
示例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));
}