本文整理汇总了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));
}
}
示例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);
}
示例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);
}
}
}
}
}
}
}
示例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);
}
}
}
}