本文整理汇总了Java中org.apache.cassandra.config.DatabaseDescriptor.getTotalCommitlogSpaceInMB方法的典型用法代码示例。如果您正苦于以下问题:Java DatabaseDescriptor.getTotalCommitlogSpaceInMB方法的具体用法?Java DatabaseDescriptor.getTotalCommitlogSpaceInMB怎么用?Java DatabaseDescriptor.getTotalCommitlogSpaceInMB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.config.DatabaseDescriptor
的用法示例。
在下文中一共展示了DatabaseDescriptor.getTotalCommitlogSpaceInMB方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isCapExceeded
import org.apache.cassandra.config.DatabaseDescriptor; //导入方法依赖的package包/类
/**
* Check to see if the speculative current size exceeds the cap.
*
* @return true if cap is exceeded
*/
private boolean isCapExceeded()
{
long currentSize = size.get();
logger.debug("Total active commitlog segment space used is {}", currentSize);
return currentSize > DatabaseDescriptor.getTotalCommitlogSpaceInMB() * 1024 * 1024;
}
示例2: unusedCapacity
import org.apache.cassandra.config.DatabaseDescriptor; //导入方法依赖的package包/类
private long unusedCapacity()
{
long total = DatabaseDescriptor.getTotalCommitlogSpaceInMB() * 1024 * 1024;
long currentSize = size.get();
logger.trace("Total active commitlog segment space used is {} out of {}", currentSize, total);
return total - currentSize;
}
示例3: unusedCapacity
import org.apache.cassandra.config.DatabaseDescriptor; //导入方法依赖的package包/类
private long unusedCapacity()
{
long currentSize = size.get();
logger.debug("Total active commitlog segment space used is {}", currentSize);
return DatabaseDescriptor.getTotalCommitlogSpaceInMB() * 1024 * 1024 - currentSize;
}