public synchronized void setCacheSize(int kb) { if (starting) { int max = MathUtils.convertLongToInt(Utils.getMemoryMax()) / 2; kb = Math.min(kb, max); } cacheSize = kb; if (pageStore != null) { pageStore.getCache().setMaxMemory(kb); } if (mvStore != null) { mvStore.setCacheSize(Math.max(1, kb)); } }
@Override public int getCacheSizeMax() { if (!database.isPersistent()) { return 0; } PageStore p = database.getPageStore(); if (p != null) { return p.getCache().getMaxMemory(); } return database.getMvStore().getStore().getCacheSize() * 1024; }
@Override public int getCacheSize() { if (!database.isPersistent()) { return 0; } PageStore p = database.getPageStore(); if (p != null) { return p.getCache().getMemory(); } return database.getMvStore().getStore().getCacheSizeUsed() * 1024; }
public synchronized void setCacheSize(int kb) { if (starting) { int max = MathUtils.convertLongToInt(Utils.getMemoryMax()) / 2; kb = Math.min(kb, max); } cacheSize = kb; if (pageStore != null) { pageStore.getCache().setMaxMemory(kb); } if (mvStore != null) { mvStore.setCacheSize(Math.max(1, kb)); } }
public synchronized void setCacheSize(int kb) { if (starting) { int max = MathUtils.convertLongToInt(Utils.getMemoryMax()) / 2; kb = Math.min(kb, max); } cacheSize = kb; if (pageStore != null) { pageStore.getCache().setMaxMemory(kb); } if (mvStore != null) { mvStore.setCacheSize(Math.max(1, kb)); } }
@Override public int getCacheSizeMax() { if (!database.isPersistent()) { return 0; } PageStore p = database.getPageStore(); if (p != null) { return p.getCache().getMaxMemory(); } return database.getMvStore().getStore().getCacheSize() * 1024; }
@Override public int getCacheSizeMax() { if (!database.isPersistent()) { return 0; } PageStore p = database.getPageStore(); if (p != null) { return p.getCache().getMaxMemory(); } return database.getMvStore().getStore().getCacheSize() * 1024; }
@Override public int getCacheSize() { if (!database.isPersistent()) { return 0; } PageStore p = database.getPageStore(); if (p != null) { return p.getCache().getMemory(); } return database.getMvStore().getStore().getCacheSizeUsed() * 1024; }
@Override public int getCacheSize() { if (!database.isPersistent()) { return 0; } PageStore p = database.getPageStore(); if (p != null) { return p.getCache().getMemory(); } return database.getMvStore().getStore().getCacheSizeUsed() * 1024; }