本文整理汇总了Java中org.mapdb.HTreeMap.remove方法的典型用法代码示例。如果您正苦于以下问题:Java HTreeMap.remove方法的具体用法?Java HTreeMap.remove怎么用?Java HTreeMap.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mapdb.HTreeMap
的用法示例。
在下文中一共展示了HTreeMap.remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clearCache
import org.mapdb.HTreeMap; //导入方法依赖的package包/类
/**
* NB: Disables caching on finalize in cleared cells. This is done to prevent
* immortal cells. Caching must be re-enabled per-cell if desired.
*
* @see CacheService#clearCache(String)
*/
@Override
public void clearCache(final String cacheId) {
if (caches.contains(cacheId)) {
final HTreeMap<?, ?> cache = db().getHashMap(cacheId);
// Disable re-caching in all cells of this cache and remove them.
for (final Object k : cache.keySet()) {
knownKeys.remove(k);
retrievedKeys.remove(k);
final SCIFIOCell<?> cell = (SCIFIOCell<?>) cache.remove(k);
if (cell != null) cell.cacheOnFinalize(false);
}
db().commit();
}
}
示例2: delete
import org.mapdb.HTreeMap; //导入方法依赖的package包/类
@Override
public boolean delete(@NotNull String namespace, @NotNull String key) throws StorageBackendException {
checkArguments(namespace, key);
HTreeMap<String, Object> openNamespace = internalOpenNamespace(namespace);
LOGGER.trace("Deleting namespace={}, key={}", namespace, key);
boolean removeSuccessful = openNamespace.remove(namespace, key);
if (!removeSuccessful) {
LOGGER.trace("Failed to delete namespace={}, key={}", namespace, key);
}
return removeSuccessful;
}
示例3: deleteBlockAtHeight
import org.mapdb.HTreeMap; //导入方法依赖的package包/类
/**
* used to get blocks unstuck, during debugging.
*
* @param blockHeight
* the block height to remove.
*/
private void deleteBlockAtHeight(final long blockHeight) {
final HTreeMap<Long, byte[]> map = getBlockHeaderByIndexMap();
map.remove(blockHeight);
map.close();
}