Esempio n. 1
0
 private Configuration configuration() {
   Configuration configuration = Configuration.defaultConfiguration();
   configuration.consolidationThreads(5);
   configuration.consolidationMinSizeBytes(4 * (1 << 20)); // 4M
   configuration.diskSegmentSizeBytes(4 * (1 << 20)); // 4M
   configuration.diskPageSizeBytes(32 * 1024); // 32K
   configuration.consolidationMaxPendingCommittedSizeBytes(20 * (1 << 20)); // 20 meg
   return configuration;
 }
Esempio n. 2
0
 private static int cacheSlots(Configuration configuration) {
   long cacheSizeBytes = configuration.diskCacheSizeBytes();
   int pageSizeBytes = configuration.diskPageSizeBytes();
   return (int) (cacheSizeBytes / pageSizeBytes);
 }