• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SiddhiAppContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.wso2.siddhi.core.config.SiddhiAppContext的典型用法代码示例。如果您正苦于以下问题:Java SiddhiAppContext类的具体用法?Java SiddhiAppContext怎么用?Java SiddhiAppContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SiddhiAppContext类属于org.wso2.siddhi.core.config包,在下文中一共展示了SiddhiAppContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
/**
 * Initialize the mapper and the mapping configurations.
 *
 * @param streamDefinition          The stream definition
 * @param optionHolder              Option holder containing static and dynamic options
 * @param payloadTemplateBuilderMap Unmapped list of payloads for reference
 */
@Override
public void init(StreamDefinition streamDefinition, OptionHolder optionHolder,
                 Map<String, TemplateBuilder> payloadTemplateBuilderMap, ConfigReader mapperConfigReader,
                 SiddhiAppContext siddhiAppContext) {

    attributeNameArray = streamDefinition.getAttributeNameArray();
    enclosingElement = optionHolder.validateAndGetStaticValue(ENCLOSING_ELEMENT_IDENTIFIER, null);
    isJsonValidationEnabled = Boolean.parseBoolean(optionHolder
            .validateAndGetStaticValue(JSON_VALIDATION_IDENTIFIER, "false"));

    //if @payload() is added there must be at least 1 element in it, otherwise a SiddhiParserException raised
    if (payloadTemplateBuilderMap != null && payloadTemplateBuilderMap.size() != 1) {
        throw new SiddhiAppCreationException("Json sink-mapper does not support multiple @payload mappings, " +
                "error at the mapper of '" + streamDefinition.getId() + "'");
    }
    if (payloadTemplateBuilderMap != null &&
            payloadTemplateBuilderMap.get(payloadTemplateBuilderMap.keySet().iterator().next()).isObjectMessage()) {
        throw new SiddhiAppCreationException("Json sink-mapper does not support object @payload mappings, " +
                "error at the mapper of '" + streamDefinition.getId() + "'");
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-map-json,代码行数:29,代码来源:JsonSinkMapper.java


示例2: init

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
/**
 * The initialization method for FunctionExecutor, this method will be called before the other methods
 *  @param attributeExpressionExecutors are the executors of each function parameters
 * @param configReader
 * @param siddhiAppContext         the context of the siddhi app
 */
@Override
protected void init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader,
                    SiddhiAppContext siddhiAppContext) {
    for (ExpressionExecutor expressionExecutor : attributeExpressionExecutors) {
        Attribute.Type attributeType = expressionExecutor.getReturnType();
        if (attributeType == Attribute.Type.DOUBLE) {
            returnType = attributeType;

        } else if ((attributeType == Attribute.Type.STRING) || (attributeType == Attribute.Type.BOOL)) {
            throw new SiddhiAppCreationException("Plus cannot have parameters with types String or Bool");
        } else {
            returnType = Attribute.Type.LONG;
        }
    }
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:22,代码来源:CustomFunctionExtension.java


示例3: init

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
public final void init(StreamDefinition streamDefinition,
                       String type,
                       OptionHolder mapOptionHolder,
                       List<Element> unmappedPayloadList,
                       Sink sink, ConfigReader mapperConfigReader,
                       LatencyTracker mapperLatencyTracker,
                       SiddhiAppContext siddhiAppContext) {
    this.mapperLatencyTracker = mapperLatencyTracker;
    this.siddhiAppContext = siddhiAppContext;
    sink.setTrpDynamicOptions(trpDynamicOptions);
    this.sinkListener = sink;
    this.optionHolder = mapOptionHolder;
    this.type = type;
    if (unmappedPayloadList != null && !unmappedPayloadList.isEmpty()) {
        templateBuilderMap = new HashMap<>();
        for (Element e : unmappedPayloadList) {
            TemplateBuilder templateBuilder = new TemplateBuilder(streamDefinition, e.getValue());
            if (templateBuilderMap.containsKey(e.getKey())) {
                throw new SiddhiAppCreationException("Duplicate Keys, " + e.getKey() + ", in @payload() ");
            }
            templateBuilderMap.put(e.getKey(), templateBuilder);
        }
    }

    init(streamDefinition, mapOptionHolder, templateBuilderMap, mapperConfigReader, siddhiAppContext);
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:27,代码来源:SinkMapper.java


示例4: generateHavingExecutor

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
private static ConditionExpressionExecutor generateHavingExecutor(Expression expression,
                                                                  MetaComplexEvent metaComplexEvent,
                                                                  SiddhiAppContext siddhiAppContext,
                                                                  Map<String, Table> tableMap,
                                                                  List<VariableExpressionExecutor>
                                                                          variableExpressionExecutors, String
                                                                          queryName) {
    ConditionExpressionExecutor havingConditionExecutor = null;
    if (expression != null) {
        havingConditionExecutor = (ConditionExpressionExecutor) ExpressionParser.parseExpression(expression,
                metaComplexEvent, SiddhiConstants.HAVING_STATE, tableMap, variableExpressionExecutors,
                siddhiAppContext, false, 0, queryName);

    }
    return havingConditionExecutor;
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:17,代码来源:SelectorParser.java


示例5: Window

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
/**
 * Construct a Window object.
 *
 * @param windowDefinition definition of the window
 * @param siddhiAppContext siddhi app context of Siddhi
 */
public Window(WindowDefinition windowDefinition, SiddhiAppContext siddhiAppContext) {
    this.windowDefinition = windowDefinition;
    this.siddhiAppContext = siddhiAppContext;
    this.elementId = siddhiAppContext.getElementIdGenerator().createNewId();
    this.lockWrapper = new LockWrapper(windowDefinition.getId());
    this.lockWrapper.setLock(new ReentrantLock());
    if (siddhiAppContext.getStatisticsManager() != null) {
        latencyTrackerFind = QueryParserHelper.createLatencyTracker(siddhiAppContext, windowDefinition.getId(),
                SiddhiConstants.METRIC_INFIX_WINDOWS, SiddhiConstants.METRIC_TYPE_FIND);
        latencyTrackerInsert = QueryParserHelper.createLatencyTracker(siddhiAppContext, windowDefinition.getId(),
                SiddhiConstants.METRIC_INFIX_WINDOWS, SiddhiConstants.METRIC_TYPE_INSERT);

        throughputTrackerFind = QueryParserHelper.createThroughputTracker(siddhiAppContext,
                windowDefinition.getId(), SiddhiConstants.METRIC_INFIX_WINDOWS, SiddhiConstants.METRIC_TYPE_FIND);
        throughputTrackerInsert = QueryParserHelper.createThroughputTracker(siddhiAppContext,
                windowDefinition.getId(), SiddhiConstants.METRIC_INFIX_WINDOWS, SiddhiConstants.METRIC_TYPE_INSERT);
    }
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:25,代码来源:Window.java


示例6: createJoinInputStreamExecutors

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
private void createJoinInputStreamExecutors(JoinInputStream inputStream, Partition partition, MetaStateEvent
        metaEvent, List<VariableExpressionExecutor> executors, SiddhiAppContext siddhiAppContext, String
        queryName) {
    createExecutors(inputStream.getLeftInputStream(), partition, metaEvent.getMetaStreamEvent(0), executors,
            siddhiAppContext, queryName);
    int size = executors.size();
    for (VariableExpressionExecutor variableExpressionExecutor : executors) {
        variableExpressionExecutor.getPosition()[SiddhiConstants.STREAM_EVENT_CHAIN_INDEX] = 0;
    }
    createExecutors(inputStream.getRightInputStream(), partition, metaEvent.getMetaStreamEvent(1), executors,
            siddhiAppContext, queryName);
    for (int i = size; i < executors.size(); i++) {
        executors.get(i).getPosition()[SiddhiConstants.STREAM_EVENT_CHAIN_INDEX] = 1;
    }

}
 
开发者ID:wso2,项目名称:siddhi,代码行数:17,代码来源:StreamPartitioner.java


示例7: initAggregator

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
public void initAggregator(ExpressionExecutor[] attributeExpressionExecutors, SiddhiAppContext
            siddhiAppContext, ConfigReader configReader) {
        this.configReader = configReader;
        try {
            this.siddhiAppContext = siddhiAppContext;
            this.attributeExpressionExecutors = attributeExpressionExecutors;
            this.attributeSize = attributeExpressionExecutors.length;
            if (elementId == null) {
                elementId = "AttributeAggregator-" + siddhiAppContext.getElementIdGenerator().createNewId();
            }
            //Not added to Snapshotable as the AggregationAttributeExecutors are added
//            siddhiAppContext.getSnapshotService().addSnapshotable(this);
            init(attributeExpressionExecutors, configReader, siddhiAppContext);
        } catch (Throwable t) {
            throw new SiddhiAppCreationException(t);
        }
    }
 
开发者ID:wso2,项目名称:siddhi,代码行数:18,代码来源:AttributeAggregator.java


示例8: PartitionRuntime

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
public PartitionRuntime(ConcurrentMap<String, AbstractDefinition> streamDefinitionMap, ConcurrentMap<String,
        StreamJunction> streamJunctionMap, Partition partition, SiddhiAppContext siddhiAppContext) {
    this.siddhiAppContext = siddhiAppContext;
    if (partition.getPartitionTypeMap().isEmpty()) {
        throw new SiddhiAppCreationException("Partition must have at least one executor. But found none.");
    }
    try {
        Element element = AnnotationHelper.getAnnotationElement("info", "name",
                partition.getAnnotations());
        if (element != null) {
            this.partitionId = element.getValue();
        }
    } catch (DuplicateAnnotationException e) {
        throw new DuplicateAnnotationException(e.getMessageWithOutContext() + " for the same Query " +
                partition.toString(), e, e.getQueryContextStartIndex(), e.getQueryContextEndIndex(),
                siddhiAppContext.getName(), siddhiAppContext.getSiddhiAppString());
    }
    if (partitionId == null) {
        this.partitionId = UUID.randomUUID().toString();
    }
    elementId = "PartitionRuntime-" + siddhiAppContext.getElementIdGenerator().createNewId();
    this.partition = partition;
    this.streamDefinitionMap = streamDefinitionMap;
    this.streamJunctionMap = streamJunctionMap;
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:26,代码来源:PartitionRuntime.java


示例9: initTransport

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
@Override
public void initTransport(OptionHolder sinkOptionHolder, List<OptionHolder> destinationOptionHolders, Annotation
        sinkAnnotation, ConfigReader sinkConfigReader, SiddhiAppContext siddhiAppContext) {
    String transportType = sinkOptionHolder.validateAndGetStaticValue(SiddhiConstants.ANNOTATION_ELEMENT_TYPE);
    Extension sinkExtension = DefinitionParserHelper.constructExtension
            (streamDefinition, SiddhiConstants.ANNOTATION_SINK, transportType, sinkAnnotation, SiddhiConstants
                    .NAMESPACE_SINK);

    destinationOptionHolders.forEach(destinationOption -> {
        Sink sink = (Sink) SiddhiClassLoader.loadExtensionImplementation(
                sinkExtension, SinkExecutorExtensionHolder.getInstance(siddhiAppContext));
        destinationOption.merge(sinkOptionHolder);
        sink.initOnlyTransport(streamDefinition, destinationOption, sinkConfigReader, siddhiAppContext);
        transports.add(sink);
    });
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:17,代码来源:MultiClientDistributedSink.java


示例10: compileCondition

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public CompiledCondition compileCondition(Expression condition, MatchingMetaInfoHolder matchingMetaInfoHolder,
                                          SiddhiAppContext siddhiAppContext,
                                          List<VariableExpressionExecutor> variableExpressionExecutors,
                                          Map<String, Table> tableMap, String queryName) {
    if (this.internalWindowProcessor instanceof FindableProcessor) {
        return ((FindableProcessor) this.internalWindowProcessor).compileCondition(condition,
                matchingMetaInfoHolder, siddhiAppContext, variableExpressionExecutors, tableMap,
                queryName);
    } else {
        throw new OperationNotSupportedException("Cannot construct finder for the window " + this
                .windowDefinition.getWindow());
    }

}
 
开发者ID:wso2,项目名称:siddhi,代码行数:19,代码来源:Window.java


示例11: initExecutor

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
public void initExecutor(ExpressionExecutor[] attributeExpressionExecutors, SiddhiAppContext
        siddhiAppContext, String queryName, ConfigReader configReader) {
    this.configReader = configReader;
    try {
        this.siddhiAppContext = siddhiAppContext;
        this.attributeExpressionExecutors = attributeExpressionExecutors;
        attributeSize = attributeExpressionExecutors.length;
        this.queryName = queryName;
        if (elementId == null) {
            elementId = "FunctionExecutor-" + siddhiAppContext.getElementIdGenerator().createNewId();
        }
        siddhiAppContext.getSnapshotService().addSnapshotable(queryName, this);
        init(attributeExpressionExecutors, configReader, siddhiAppContext);
    } catch (Throwable t) {
        throw new SiddhiAppCreationException(t);
    }
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:18,代码来源:FunctionExecutor.java


示例12: ObjectSizeCalculator

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
/**
 * Creates an object size calculator that can calculate object sizes for a given
 * {@code memoryLayoutSpecification}.
 *
 * @param memoryLayoutSpecification a description of the JVM memory layout.
 */
public ObjectSizeCalculator(MemoryLayoutSpecification memoryLayoutSpecification) {
    Preconditions.checkNotNull(memoryLayoutSpecification);
    arrayHeaderSize = memoryLayoutSpecification.getArrayHeaderSize();
    objectHeaderSize = memoryLayoutSpecification.getObjectHeaderSize();
    objectPadding = memoryLayoutSpecification.getObjectPadding();
    referenceSize = memoryLayoutSpecification.getReferenceSize();
    superclassFieldPadding = memoryLayoutSpecification.getSuperclassFieldPadding();
    ignoreCalculation.add(SiddhiAppContext.class);
    ignoreCalculation.add(StreamJunction.class);
    ignoreCalculation.add(OutputCallback.class);
    ignoreCalculation.add(StreamCallback.class);
    ignoreCalculation.add(ThroughputTracker.class);
    ignoreCalculation.add(LatencyTracker.class);
    ignoreCalculation.add(MemoryUsageTracker.class);
    ignoreCalculation.add(BufferedEventsTracker.class);
    ignoreCalculation.add(StatisticsManager.class);
    ignoreCalculation.add(MemoryCalculable.class);
    ignoreCalculation.add(AbstractRecordTable.class);
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:26,代码来源:ObjectSizeCalculator.java


示例13: AbstractExtensionHolder

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
protected AbstractExtensionHolder(Class clazz, SiddhiAppContext siddhiAppContext) {
    Map<String, Class> extensions = siddhiAppContext.getSiddhiContext().getSiddhiExtensions();
    if (extensions != null) {
        for (String extensionKey : siddhiAppContext.getSiddhiContext().getSiddhiExtensions().keySet()) {
            Class extension = extensions.get(extensionKey);
            if (clazz.isAssignableFrom(extension)) {
                if (extensionMap.containsKey(extensionKey)) {
                    log.error("Extension class " + extension.getName() + " not loaded, as there is already an" +
                                      " matching extension '" + extensionKey + "' implemented as " + extensionMap
                            .get
                                    (extensionKey).getName());
                } else {
                    extensionMap.put(extensionKey, extension);
                }

            }

        }
    }
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:21,代码来源:AbstractExtensionHolder.java


示例14: init

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
@Override
public void init(StreamDefinition streamDefinition, OptionHolder optionHolder, List<AttributeMapping> list,
                 ConfigReader configReader, SiddhiAppContext siddhiAppContext) {

    this.streamDefinition = streamDefinition;
    this.streamAttributes = this.streamDefinition.getAttributeList();
    attributesSize = this.streamDefinition.getAttributeList().size();
    this.mappingPositions = new MappingPositionData[attributesSize];
    failOnMissingAttribute = Boolean.parseBoolean(optionHolder.
            validateAndGetStaticValue(FAIL_ON_MISSING_ATTRIBUTE_IDENTIFIER, "true"));
    factory = new JsonFactory();
    if (list != null && list.size() > 0) {
        isCustomMappingEnabled = true;
        enclosingElement = optionHolder.validateAndGetStaticValue(ENCLOSING_ELEMENT_IDENTIFIER,
                DEFAULT_ENCLOSING_ELEMENT);
        for (int i = 0; i < list.size(); i++) {
            AttributeMapping attributeMapping = list.get(i);
            String attributeName = attributeMapping.getName();
            int position;
            if (attributeName != null) {
                position = this.streamDefinition.getAttributePosition(attributeName);
            } else {
                position = i;
            }
            this.mappingPositions[i] = new MappingPositionData(position, attributeMapping.getMapping());
        }
    } else {
        for (int i = 0; i < attributesSize; i++) {
            this.mappingPositions[i] = new MappingPositionData(i, DEFAULT_JSON_MAPPING_PREFIX + this
                    .streamDefinition.getAttributeList().get(i).getName());
        }
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-map-json,代码行数:34,代码来源:JsonSourceMapper.java


示例15: init

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
/**
 * The initialization method for FunctionExecutor, this method will be called before the other methods
 */
@Override
protected void init(ExpressionExecutor[] expressionExecutors, ConfigReader configReader, SiddhiAppContext siddhiAppContext) {
	for (ExpressionExecutor expressionExecutor : attributeExpressionExecutors) {
		Attribute.Type attributeType = expressionExecutor.getReturnType();
		if (attributeType == Attribute.Type.DOUBLE) {
			returnType = attributeType;

		} else if ((attributeType == Attribute.Type.STRING) || (attributeType == Attribute.Type.BOOL)) {
			throw new SiddhiAppCreationException("Plus cannot have parameters with types String or Bool");
		} else {
			returnType = Attribute.Type.LONG;
		}
	}
}
 
开发者ID:haoch,项目名称:flink-siddhi,代码行数:18,代码来源:CustomPlusFunctionExtension.java


示例16: init

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
/**
 * The initialization method for FunctionExecutor, this method will be called before the other methods
 */
@Override
protected void init(ExpressionExecutor[] expressionExecutors, ConfigReader configReader, SiddhiAppContext siddhiAppContext) {
    for (ExpressionExecutor expressionExecutor : attributeExpressionExecutors) {
        Attribute.Type attributeType = expressionExecutor.getReturnType();
        if (attributeType == Attribute.Type.DOUBLE) {
            returnType = attributeType;

        } else if ((attributeType == Attribute.Type.STRING) || (attributeType == Attribute.Type.BOOL)) {
            throw new SiddhiAppCreationException("Plus cannot have parameters with types String or Bool");
        } else {
            returnType = Attribute.Type.LONG;
        }
    }
}
 
开发者ID:apache,项目名称:bahir-flink,代码行数:18,代码来源:CustomPlusFunctionExtension.java


示例17: StreamJunction

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
public StreamJunction(StreamDefinition streamDefinition, ExecutorService executorService, int bufferSize,
                      SiddhiAppContext siddhiAppContext) {
    this.streamDefinition = streamDefinition;
    this.bufferSize = bufferSize;
    this.executorService = executorService;
    this.siddhiAppContext = siddhiAppContext;
    if (siddhiAppContext.getStatisticsManager() != null) {
        this.throughputTracker = QueryParserHelper.createThroughputTracker(siddhiAppContext,
                streamDefinition.getId(),
                SiddhiConstants.METRIC_INFIX_STREAMS, null);
    }
    try {
        Annotation annotation = AnnotationHelper.getAnnotation(SiddhiConstants.ANNOTATION_ASYNC,
                streamDefinition.getAnnotations());
        if (annotation != null) {
            async = true;
            String bufferSizeString = annotation.getElement(SiddhiConstants.ANNOTATION_ELEMENT_BUFFER_SIZE);
            if (bufferSizeString != null) {
                this.bufferSize = Integer.parseInt(bufferSizeString);
            }
        }

    } catch (DuplicateAnnotationException e) {
        throw new DuplicateAnnotationException(e.getMessageWithOutContext() + " for the same Stream " +
                streamDefinition.getId(), e, e.getQueryContextStartIndex(), e.getQueryContextEndIndex(),
                siddhiAppContext.getName(), siddhiAppContext.getSiddhiAppString());
    }
    isTraceEnabled = log.isTraceEnabled();
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:30,代码来源:StreamJunction.java


示例18: IncrementalDataAggregator

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
public IncrementalDataAggregator(List<TimePeriod.Duration> incrementalDurations,
                                 TimePeriod.Duration aggregateForDuration, List<ExpressionExecutor> baseExecutors,
                                 ExpressionExecutor timestampExecutor, MetaStreamEvent metaStreamEvent,
                                 SiddhiAppContext siddhiAppContext) {
    this.incrementalDurations = incrementalDurations;
    this.aggregateForDuration = aggregateForDuration;
    this.timestampExecutor = timestampExecutor;
    this.timeZoneExecutor = baseExecutors.get(0);
    StreamEventPool streamEventPool = new StreamEventPool(metaStreamEvent, 10);
    this.baseIncrementalValueStore = new BaseIncrementalValueStore(-1, baseExecutors, streamEventPool,
            siddhiAppContext, null);
    this.baseIncrementalValueStoreMap = new HashMap<>();
    this.baseIncrementalValueGroupByStoreMap = new HashMap<>();
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:15,代码来源:IncrementalDataAggregator.java


示例19: getInstance

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
public static StreamProcessorExtensionHolder getInstance(SiddhiAppContext siddhiAppContext) {
    ConcurrentHashMap<Class, AbstractExtensionHolder> extensionHolderMap = siddhiAppContext.getSiddhiContext
            ().getExtensionHolderMap();
    AbstractExtensionHolder abstractExtensionHolder = extensionHolderMap.get(clazz);
    if (abstractExtensionHolder == null) {
        abstractExtensionHolder = new StreamProcessorExtensionHolder(siddhiAppContext);
        extensionHolderMap.putIfAbsent(clazz, abstractExtensionHolder);
    }
    return (StreamProcessorExtensionHolder) extensionHolderMap.get(clazz);
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:11,代码来源:StreamProcessorExtensionHolder.java


示例20: init

import org.wso2.siddhi.core.config.SiddhiAppContext; //导入依赖的package包/类
@Override
protected void init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader,
                    SiddhiAppContext siddhiAppContext) {
    if (!(attributeExpressionExecutors.length == 0 || attributeExpressionExecutors.length == 1)) {
        throw new SiddhiAppValidationException("incrementalAggregator:getTimeZone() function " +
                "accepts zero or one argument, but found " + attributeExpressionExecutors.length);
    }
    if (attributeExpressionExecutors.length == 1) {
        if (attributeExpressionExecutors[0].getReturnType() != Attribute.Type.STRING) {
            throw new SiddhiAppValidationException("Time zone can be retrieved, only from " +
                    "string values, but found " +  attributeExpressionExecutors[0].getReturnType());
        }
    }
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:15,代码来源:IncrementalTimeGetTimeZone.java



注:本文中的org.wso2.siddhi.core.config.SiddhiAppContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WorkflowDocumentService类代码示例发布时间:2022-05-22
下一篇:
Java RestConnection类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap