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


Java ConcurrentSkipListSet.remove方法代码示例

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


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

示例1: deleteIndex

import java.util.concurrent.ConcurrentSkipListSet; //导入方法依赖的package包/类
@Override
public void deleteIndex(NitriteId id, String field, String text) {
    try {
        NitriteMap<Comparable, ConcurrentSkipListSet<NitriteId>> indexMap
                = indexMetaService.getIndexMap(field);
        Set<String> words = tokenizerService.tokenize(text);

        for (String word : words) {
            ConcurrentSkipListSet<NitriteId> nitriteIds = indexMap.get(word);
            if (nitriteIds != null) {
                nitriteIds.remove(id);
            }
        }
    } catch (IOException ioe) {
        throw new IndexingException(errorMessage(
                "failed to remove full-text index data for " + field + " with id " + id,
                IE_REMOVE_FULL_TEXT_INDEX_FAILED));
    }
}
 
开发者ID:dizitart,项目名称:nitrite-database,代码行数:20,代码来源:NitriteTextIndexingService.java

示例2: removeProperty

import java.util.concurrent.ConcurrentSkipListSet; //导入方法依赖的package包/类
public synchronized void removeProperty(Property property) {
    Map<String, ConcurrentSkipListSet<Property>> propertiesByKey = propertiesByNameAndKey.get(property.getName());
    if (propertiesByKey == null) {
        return;
    }
    ConcurrentSkipListSet<Property> properties = propertiesByKey.get(property.getKey());
    if (properties == null) {
        return;
    }
    properties.remove(property);
    this.propertiesList.remove(property);
}
 
开发者ID:mware-solutions,项目名称:memory-graph,代码行数:13,代码来源:PropertyCollection.java

示例3: removeIndexEntry

import java.util.concurrent.ConcurrentSkipListSet; //导入方法依赖的package包/类
void removeIndexEntry(Document document, NitriteId nitriteId) {
    Set<String> fields = getFields(document);

    for (String field : fields) {
        Index index = indexMetaService.findIndex(field);
        if (index != null) {
            Object fieldValue = getFieldValue(document, field);

            if (fieldValue == null) continue;

            // if dirty index and currently indexing is not running, rebuild
            if (indexMetaService.isDirtyIndex(field) && !indexBuildRegistry.get(field).get()) {
                // rebuild will also take care of the current document
                rebuildIndex(index, true);
            } else {
                IndexType indexType = index.getIndexType();

                if (indexType == IndexType.Fulltext && fieldValue instanceof String) {
                    textIndexingService.deleteIndex(nitriteId, field, (String) fieldValue);
                } else {
                    NitriteMap<Comparable, ConcurrentSkipListSet<NitriteId>> indexMap
                            = indexMetaService.getIndexMap(field);

                    // create the nitrite list associated with the value
                    if (fieldValue instanceof Comparable) {
                        ConcurrentSkipListSet<NitriteId> nitriteIdList = indexMap.get((Comparable) fieldValue);
                        if (nitriteIdList != null) {
                            nitriteIdList.remove(nitriteId);
                            indexMap.put((Comparable) fieldValue, nitriteIdList);
                        }
                    }
                }
            }
        }
    }
}
 
开发者ID:dizitart,项目名称:nitrite-database,代码行数:37,代码来源:IndexingService.java

示例4: removeMarket

import java.util.concurrent.ConcurrentSkipListSet; //导入方法依赖的package包/类
/**
 * Remove this market data from financial market with specified market code
 * This can be used when reload data
 * @param category the market data search category
 * @param marketCode the market code that is going to be removed
 */
public void removeMarket(String category, String marketCode) {
    if (financialMarketData.get(category) != null) {
        ConcurrentSkipListSet<Market> markets = financialMarketData.get(category);
        Iterator<Market> iterator = markets.iterator();
        while(iterator.hasNext()) {
            Market market = iterator.next();
            if (market.getMarketCode().compareToIgnoreCase(marketCode)==0) {
                markets.remove(market);
            }
        }
    }
}
 
开发者ID:ztan5,项目名称:TechnicalAnalysisTool,代码行数:19,代码来源:FinancialMarket.java


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