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


Java ContextPartitionIdentifier類代碼示例

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


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

示例1: filter

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public boolean filter(ContextPartitionIdentifier contextPartitionIdentifier) {
    ContextPartitionIdentifierInitiatedTerminated id = (ContextPartitionIdentifierInitiatedTerminated) contextPartitionIdentifier;
    if (matchP00Value == null && cpids.contains(id.getContextPartitionId())) {
        throw new RuntimeException("Already exists context id: " + id.getContextPartitionId());
    }
    cpids.add(id.getContextPartitionId());
    startTimes.add(id.getStartTime());
    String p00Value = (String) ((EventBean) id.getProperties().get("s0")).get("p00");
    p00PropertyValues.add(p00Value);
    lastValue = id;
    return matchP00Value != null && matchP00Value.equals(p00Value);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:13,代碼來源:SupportSelectorFilteredInitTerm.java

示例2: visit

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public void visit(int nestingLevel, int pathId, ContextStatePathValueBinding binding, Object payload, ContextController contextController, ContextControllerInstanceHandle instanceHandle) {
    ContextStatePathKey key = new ContextStatePathKey(nestingLevel, pathId, instanceHandle.getSubPathId());
    int maxNestingLevel = nestedFactories.length;

    int contextPartitionOrSubPath = instanceHandle.getContextPartitionOrPathId();

    if (contextController.getFactory().getFactoryContext().getNestingLevel() == maxNestingLevel) {
        List<LeafDesc> agentInstances = controllerAgentInstances.get(contextController);
        if (agentInstances == null) {
            agentInstances = new ArrayList<LeafDesc>();
            controllerAgentInstances.put(contextController, agentInstances);
        }
        ContextStatePathValue value = new ContextStatePathValue(contextPartitionOrSubPath, binding.toByteArray(payload), instanceHandle.getInstances().getState());
        agentInstances.add(new LeafDesc(key, value));

        // generate a nice payload text from the paths of keys
        ContextControllerTreeEntry entry = subcontexts.get(contextController);
        ContextPartitionIdentifier[] keys = ContextManagerNested.getTreeCompositeKey(nestedFactories, payload, entry, subcontexts);
        ContextPartitionDescriptor descriptor = new ContextPartitionDescriptor(contextPartitionOrSubPath, new ContextPartitionIdentifierNested(keys), value.getState());
        agentInstanceInfo.put(contextPartitionOrSubPath, descriptor);
        states.put(key, value);
    } else {
        // handle non-leaf
        subpaths.add(contextPartitionOrSubPath);
        states.put(key, new ContextStatePathValue(contextPartitionOrSubPath, binding.toByteArray(payload), ContextPartitionState.STARTED));
    }
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:28,代碼來源:ContextPartitionVisitorStateWithPath.java

示例3: visit

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public void visit(int nestingLevel, int pathId, ContextStatePathValueBinding binding, Object payload, ContextController contextController, ContextControllerInstanceHandle instanceHandle) {
    ContextStatePathKey key = new ContextStatePathKey(nestingLevel, pathId, instanceHandle.getSubPathId());
    int agentInstanceId = instanceHandle.getContextPartitionOrPathId();
    states.put(key, new ContextStatePathValue(agentInstanceId, binding.toByteArray(payload), instanceHandle.getInstances().getState()));

    ContextPartitionState state = instanceHandle.getInstances().getState();
    ContextPartitionIdentifier identifier = contextController.getFactory().keyPayloadToIdentifier(payload);
    ContextPartitionDescriptor descriptor = new ContextPartitionDescriptor(agentInstanceId, identifier, state);
    contextPartitionInfo.put(agentInstanceId, descriptor);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:11,代碼來源:ContextPartitionVisitorState.java

示例4: contextPartitionInstantiate

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public ContextControllerInstanceHandle contextPartitionInstantiate(Integer optionalContextPartitionId,
int subpath,
Integer importSubpathId, ContextController originator, EventBean optionalTriggeringEvent,
Map<String, Object> optionalTriggeringPattern,
Object partitionKey,
Map<String, Object> contextProperties,
ContextControllerState states,
ContextInternalFilterAddendum filterAddendum,
boolean isRecoveringResilient,
ContextPartitionState state,
Supplier<ContextPartitionIdentifier> identifier);
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:12,代碼來源:ContextControllerLifecycleCallback.java

示例5: keyPayloadToIdentifier

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public ContextPartitionIdentifier keyPayloadToIdentifier(Object payload) {
    ContextControllerInitTermState state = (ContextControllerInitTermState) payload;
    return new ContextPartitionIdentifierInitiatedTerminated(
            state == null ? null : state.getPatternData(),
            state == null ? 0 : state.getStartTime(),
            null);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:8,代碼來源:ContextControllerInitTermFactoryBase.java

示例6: keyPayloadToIdentifier

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public ContextPartitionIdentifier keyPayloadToIdentifier(Object payload) {
    if (payload instanceof Object[]) {
        return new ContextPartitionIdentifierPartitioned((Object[]) payload);
    }
    if (payload instanceof MultiKeyUntyped) {
        return new ContextPartitionIdentifierPartitioned(((MultiKeyUntyped) payload).getKeys());
    }
    if (payload instanceof ContextControllerPartitionedState) {
        return new ContextPartitionIdentifierPartitioned(((ContextControllerPartitionedState) payload).getPartitionKey());
    }
    return new ContextPartitionIdentifierPartitioned(new Object[]{payload});
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:13,代碼來源:ContextControllerPartitionedFactoryBase.java

示例7: filter

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public boolean filter(ContextPartitionIdentifier contextPartitionIdentifier) {
    ContextPartitionIdentifierInitiatedTerminated id = (ContextPartitionIdentifierInitiatedTerminated) contextPartitionIdentifier;
    if (matchP00Value == null && cpids.contains(id.getContextPartitionId())) {
        throw new RuntimeException("Already exists context id: " + id.getContextPartitionId());
    }
    cpids.add(id.getContextPartitionId());
    startTimes.add(id.getStartTime());
    String p00Value = (String) ((EventBean)id.getProperties().get("s0")).get("p00");
    p00PropertyValues.add(p00Value);
    lastValue = id;
    return matchP00Value != null && matchP00Value.equals(p00Value);
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:13,代碼來源:SupportSelectorFilteredInitTerm.java

示例8: keyPayloadToIdentifier

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public ContextPartitionIdentifier keyPayloadToIdentifier(Object payload) {
    return new ContextPartitionIdentifierHash((Integer) payload);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:4,代碼來源:ContextControllerHashFactoryBase.java

示例9: keyPayloadToIdentifier

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public ContextPartitionIdentifier keyPayloadToIdentifier(Object payload) {
    int index = (Integer) payload;
    return new ContextPartitionIdentifierCategory(categorySpec.getItems().get(index).getName());
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:5,代碼來源:ContextControllerCategoryFactoryBase.java

示例10: keyPayloadToIdentifier

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public ContextPartitionIdentifier keyPayloadToIdentifier(Object payload); 
開發者ID:espertechinc,項目名稱:esper,代碼行數:2,代碼來源:ContextControllerFactory.java

示例11: deletePath

import com.espertech.esper.client.context.ContextPartitionIdentifier; //導入依賴的package包/類
public void deletePath(ContextPartitionIdentifier identifier); 
開發者ID:espertechinc,項目名稱:esper,代碼行數:2,代碼來源:ContextController.java


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