use of com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache in project orientdb by orientechnologies.
the class OEngineLocalPaginated method startup.
@Override
public void startup() {
OMemoryAndLocalPaginatedEnginesInitializer.INSTANCE.initialize();
super.startup();
readCache = new O2QCache(calculateReadCacheMaxMemory(OGlobalConfiguration.DISK_CACHE_SIZE.getValueAsLong() * 1024 * 1024), OGlobalConfiguration.DISK_CACHE_PAGE_SIZE.getValueAsInteger() * 1024, true, OGlobalConfiguration.DISK_CACHE_PINNED_PAGES.getValueAsInteger());
try {
if (OByteBufferPool.instance() != null)
OByteBufferPool.instance().registerMBean();
} catch (Exception e) {
OLogManager.instance().error(this, "MBean for byte buffer pool cannot be registered", e);
}
}
use of com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache in project orientdb by orientechnologies.
the class OPerformanceStatisticManager method gerReadCache.
/**
* @return Returns current instance of read cache and initializes local reference if such one is not initialized yet.
*/
private O2QCache gerReadCache() {
if (readCacheInitialized)
return readCache;
final OReadCache cache = storage.getReadCache();
if (cache instanceof O2QCache) {
this.readCache = (O2QCache) cache;
} else {
this.readCache = null;
}
readCacheInitialized = true;
return readCache;
}
use of com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache in project orientdb by orientechnologies.
the class ReadWriteCacheConcurrentTest method initBuffer.
private void initBuffer() throws IOException {
writeBuffer = new OWOWCache(false, 8 + systemOffset, new OByteBufferPool(8 + systemOffset), 10000, null, -1, 15000 * (8 + systemOffset), 4 * (8 + systemOffset) + 15000 * (8 + systemOffset), storageLocal, true, files, 1);
writeBuffer.loadRegisteredFiles();
readBuffer = new O2QCache(4 * (8 + systemOffset), 8 + systemOffset, true, 20);
}
Aggregations