public void compactFile(long maxCompactTime){
  store.setRetentionTime(0);
  long start=System.currentTimeMillis();
  while (store.compact(95,16 * 1024 * 1024)) {
    store.sync();
    store.compactMoveChunks(95,16 * 1024 * 1024);
    long time=System.currentTimeMillis() - start;
    if (time > maxCompactTime) {
      break;
    }
  }
}

public void compactFile ( long maxCompactTime ) { store . setRetentionTime ( 0 ) ; long start = System . currentTimeMillis ( ) ; while ( store . compact ( 95 , 16 * 1024 * 1024 ) ) { store . sync ( ) ; store . compactMoveChunks ( 95 , 16 * 1024 * 1024 ) ; long time = System . currentTimeMillis ( ) - start ; if ( time > maxCompactTime ) { break ; } } }
compact the database file , that is , compact blocks that have a low fill rate , and move chunks next to each other . this will typically shrink the database file . changes are flushed to the file , and old chunks are overwritten .
