當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。