Search in sources :

Example 1 with O2QCache

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);
    }
}
Also used : O2QCache(com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache) ODatabaseException(com.orientechnologies.orient.core.exception.ODatabaseException) OException(com.orientechnologies.common.exception.OException)

Example 2 with O2QCache

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;
}
Also used : OReadCache(com.orientechnologies.orient.core.storage.cache.OReadCache) O2QCache(com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache)

Example 3 with O2QCache

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);
}
Also used : OWOWCache(com.orientechnologies.orient.core.storage.cache.local.OWOWCache) OByteBufferPool(com.orientechnologies.common.directmemory.OByteBufferPool) O2QCache(com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache)

Aggregations

O2QCache (com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache)3 OByteBufferPool (com.orientechnologies.common.directmemory.OByteBufferPool)1 OException (com.orientechnologies.common.exception.OException)1 ODatabaseException (com.orientechnologies.orient.core.exception.ODatabaseException)1 OReadCache (com.orientechnologies.orient.core.storage.cache.OReadCache)1 OWOWCache (com.orientechnologies.orient.core.storage.cache.local.OWOWCache)1