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


Java StreamDefinition.equals方法代码示例

本文整理汇总了Java中org.wso2.siddhi.query.api.definition.StreamDefinition.equals方法的典型用法代码示例。如果您正苦于以下问题:Java StreamDefinition.equals方法的具体用法?Java StreamDefinition.equals怎么用?Java StreamDefinition.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.wso2.siddhi.query.api.definition.StreamDefinition的用法示例。


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

示例1: defineStream

import org.wso2.siddhi.query.api.definition.StreamDefinition; //导入方法依赖的package包/类
public ExecutionPlan defineStream(StreamDefinition streamDefinition) {
    if (streamDefinition == null) {
        throw new ExecutionPlanValidationException("Stream Definition should not be null");
    } else if (streamDefinition.getId() == null) {
        throw new ExecutionPlanValidationException("Stream Id should not be null for Stream Definition");
    }
    StreamDefinition existingStreamDefinition = streamDefinitionMap.get(streamDefinition.getId());
    if (existingStreamDefinition != null && !existingStreamDefinition.equals(streamDefinition)) {
        throw new ExecutionPlanValidationException("Stream Definition with same Stream Id " +
                streamDefinition.getId() + " already exist : " + existingStreamDefinition +
                ", hence cannot add " + streamDefinition);
    } else {
        this.streamDefinitionMap.put(streamDefinition.getId(), streamDefinition);
    }
    return this;
}
 
开发者ID:sacjaya,项目名称:siddhi-3,代码行数:17,代码来源:ExecutionPlan.java

示例2: checkDuplicateDefinition

import org.wso2.siddhi.query.api.definition.StreamDefinition; //导入方法依赖的package包/类
private void checkDuplicateDefinition(AbstractDefinition definition) {
    TableDefinition existingTableDefinition = tableDefinitionMap.get(definition.getId());
    if (existingTableDefinition != null && (!existingTableDefinition.equals(definition) || definition instanceof
            StreamDefinition)) {
        throw new DuplicateDefinitionException("Table Definition with same Stream Id '" +
                definition.getId() + "' already exist : " + existingTableDefinition +
                ", hence cannot add " + definition, definition.getQueryContextStartIndex(),
                definition.getQueryContextEndIndex());
    }
    StreamDefinition existingStreamDefinition = streamDefinitionMap.get(definition.getId());
    if (existingStreamDefinition != null && (!existingStreamDefinition.equals(definition) || definition
            instanceof TableDefinition)) {
        throw new DuplicateDefinitionException("Stream Definition with same Stream Id '" +
                definition.getId() + "' already exist : " + existingStreamDefinition +
                ", hence cannot add " + definition, definition.getQueryContextStartIndex(),
                definition.getQueryContextEndIndex());
    }
    WindowDefinition existingWindowDefinition = windowDefinitionMap.get(definition.getId());
    if (existingWindowDefinition != null && (!existingWindowDefinition.equals(definition) || definition
            instanceof WindowDefinition)) {
        throw new DuplicateDefinitionException("Stream Definition with same Window Id '" +
                definition.getId() + "' already exist : " + existingWindowDefinition +
                ", hence cannot add " + definition, definition.getQueryContextStartIndex(),
                definition.getQueryContextEndIndex());
    }
    AggregationDefinition existingAggregationDefinition = aggregationDefinitionMap.get(definition.getId());
    if (existingAggregationDefinition != null
            && (!existingAggregationDefinition.equals(definition) || definition instanceof AggregationDefinition)) {
        throw new DuplicateDefinitionException("Aggregate Definition with same Aggregate Id '" + definition.getId()
                + "' already exist : " + existingAggregationDefinition + ", hence cannot add " + definition,
                definition.getQueryContextStartIndex(), definition.getQueryContextEndIndex());
    }
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:34,代码来源:SiddhiApp.java

示例3: validate

import org.wso2.siddhi.query.api.definition.StreamDefinition; //导入方法依赖的package包/类
/**
 * Method to validate stream definition
 *
 * @param definitionList List of existing definitions
 * @param newDefinition  New definitions which needs to be validated
 * @throws org.wso2.siddhi.core.exception.ValidatorException Thrown if validation is failed
 */
public static void validate(List<StreamDefinition> definitionList, StreamDefinition newDefinition) throws ValidatorException {
    for (StreamDefinition definition : definitionList) {
        if ((definition.getId().equals(newDefinition.getId())) && !definition.equals(newDefinition)) {
            throw new ValidatorException("Different stream definition already exist under stream name " + newDefinition.getId());
        }
    }
}
 
开发者ID:sacjaya,项目名称:siddhi-3,代码行数:15,代码来源:OutStreamValidator.java

示例4: validate

import org.wso2.siddhi.query.api.definition.StreamDefinition; //导入方法依赖的package包/类
/**
 * Method to validate stream definition
 *
 * @param definitionList List of existing definitions
 * @param newDefinition  New definitions which needs to be validated
 * @throws ValidatorException Thrown if validation is failed
 */
public static void validate(List<StreamDefinition> definitionList, StreamDefinition newDefinition) throws ValidatorException {
    for (StreamDefinition definition : definitionList) {
        if ((definition.getId().equals(newDefinition.getId())) && !definition.equals(newDefinition)) {
            throw new ValidatorException("Different stream definition already exist under stream name " + newDefinition.getId());
        }
    }
}
 
开发者ID:sacjaya,项目名称:siddhi-3,代码行数:15,代码来源:StreamValidator.java


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