本文整理了Java中org.geowebcache.diskquota.storage.Quota.subtract
方法的一些代码示例,展示了Quota.subtract
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quota.subtract
方法的具体详情如下:
包路径:org.geowebcache.diskquota.storage.Quota
类名称:Quota
方法名:subtract
[英]Shorthand for #subtract(BigInteger)
[中]#subtract(大整数)的缩写
代码示例来源:origin: GeoWebCache/geowebcache
/** Shorthand for {@link #subtract(BigInteger) subtract(quota.getBytes())} */
public void subtract(final Quota quota) {
subtract(quota.getBytes());
}
代码示例来源:origin: GeoWebCache/geowebcache
/** Shorthand for {@link #subtract(BigInteger) subtract(units.toBytes(amount))} */
public void subtract(final double amount, final StorageUnit units) {
subtract(units.toBytes(amount));
}
代码示例来源:origin: GeoWebCache/geowebcache
public void call(Transaction transaction) {
EntityCursor<TileSet> tileSets =
tileSetsByLayer.entities(transaction, layerName, true, layerName, true, null);
TileSet tileSet;
Quota freed;
Quota global;
try {
while (null != (tileSet = tileSets.next())) {
if (shouldDelete.test(tileSet)) {
freed =
usedQuotaByTileSetId.get(
transaction, tileSet.getId(), LockMode.DEFAULT);
global =
usedQuotaByTileSetId.get(
transaction, GLOBAL_QUOTA_NAME, LockMode.DEFAULT);
tileSets.delete();
global.subtract(freed.getBytes());
usedQuotaById.put(transaction, global);
}
}
} finally {
tileSets.close();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!