/** * Check that the store usage limit is not greater than max usable * space and adjust if it is */ protected void checkStoreUsageLimits() throws Exception { final SystemUsage usage = getSystemUsage(); if (getPersistenceAdapter() != null) { PersistenceAdapter adapter = getPersistenceAdapter(); checkUsageLimit(adapter.getDirectory(), usage.getStoreUsage(), usage.getStoreUsage().getPercentLimit()); long maxJournalFileSize = 0; long storeLimit = usage.getStoreUsage().getLimit(); if (adapter instanceof JournaledStore) { maxJournalFileSize = ((JournaledStore) adapter).getJournalMaxFileLength(); } if (storeLimit > 0 && storeLimit < maxJournalFileSize) { LOG.error("Store limit is " + storeLimit / (1024 * 1024) + " mb, whilst the max journal file size for the store is: " + maxJournalFileSize / (1024 * 1024) + " mb, " + "the store will not accept any data when used."); } } }
/** * Check that the store usage limit is not greater than max usable * space and adjust if it is */ protected void checkStoreUsageLimits() throws Exception { final SystemUsage usage = getSystemUsage(); if (getPersistenceAdapter() != null) { PersistenceAdapter adapter = getPersistenceAdapter(); checkUsageLimit(adapter.getDirectory(), usage.getStoreUsage(), usage.getStoreUsage().getPercentLimit()); long maxJournalFileSize = 0; long storeLimit = usage.getStoreUsage().getLimit(); if (adapter instanceof JournaledStore) { maxJournalFileSize = ((JournaledStore) adapter).getJournalMaxFileLength(); } if (storeLimit > 0 && storeLimit < maxJournalFileSize) { LOG.error("Store limit is " + storeLimit / (1024 * 1024) + " mb, whilst the max journal file size for the store is: " + maxJournalFileSize / (1024 * 1024) + " mb, " + "the store will not accept any data when used."); } } }
/** * Check that the store usage limit is not greater than max usable * space and adjust if it is */ protected void checkStoreUsageLimits() throws Exception { final SystemUsage usage = getSystemUsage(); if (getPersistenceAdapter() != null) { PersistenceAdapter adapter = getPersistenceAdapter(); checkUsageLimit(adapter.getDirectory(), usage.getStoreUsage(), usage.getStoreUsage().getPercentLimit()); long maxJournalFileSize = 0; long storeLimit = usage.getStoreUsage().getLimit(); if (adapter instanceof JournaledStore) { maxJournalFileSize = ((JournaledStore) adapter).getJournalMaxFileLength(); } if (storeLimit > 0 && storeLimit < maxJournalFileSize) { LOG.error("Store limit is " + storeLimit / (1024 * 1024) + " mb, whilst the max journal file size for the store is: " + maxJournalFileSize / (1024 * 1024) + " mb, " + "the store will not accept any data when used."); } } }
/** * Check that the store usage limit is not greater than max usable * space and adjust if it is */ protected void checkStoreUsageLimits() throws Exception { final SystemUsage usage = getSystemUsage(); if (getPersistenceAdapter() != null) { PersistenceAdapter adapter = getPersistenceAdapter(); checkUsageLimit(adapter.getDirectory(), usage.getStoreUsage(), usage.getStoreUsage().getPercentLimit()); long maxJournalFileSize = 0; long storeLimit = usage.getStoreUsage().getLimit(); if (adapter instanceof JournaledStore) { maxJournalFileSize = ((JournaledStore) adapter).getJournalMaxFileLength(); } if (storeLimit > 0 && storeLimit < maxJournalFileSize) { LOG.error("Store limit is " + storeLimit / (1024 * 1024) + " mb, whilst the max journal file size for the store is: " + maxJournalFileSize / (1024 * 1024) + " mb, " + "the store will not accept any data when used."); } } }