Ejemplo 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;
 }
Ejemplo n.º 2
0
 private static int cacheSlots(Configuration configuration) {
   long cacheSizeBytes = configuration.diskCacheSizeBytes();
   int pageSizeBytes = configuration.diskPageSizeBytes();
   return (int) (cacheSizeBytes / pageSizeBytes);
 }
Ejemplo n.º 3
0
 public TestFactory(LockManager lockManager) {
   super(Configuration.defaultConfiguration());
   this.lockManager = lockManager;
   transactionManager(new TransactionManager(this));
   Transaction.initialize(this);
 }