Пример #1
0
 /**
  * Calls ObjectStore.releaseGoFaster() if this object wraps a Results object from an
  * ObjectStoreInterMineImpl.
  *
  * @throws ObjectStoreException if ObjectStoreInterMineImpl.releaseGoFaster() throws the exception
  */
 public synchronized void releaseGoFaster() throws ObjectStoreException {
   goingFaster--;
   if (goingFaster == 0) {
     ObjectStore os = osResults.getObjectStore();
     if (os instanceof ObjectStoreInterMineImpl) {
       ((ObjectStoreInterMineImpl) os).releaseGoFaster(osResults.getQuery());
     }
   }
 }
Пример #2
0
 /**
  * Calls ObjectStore.goFaster() if this object wraps a Results object from an
  * ObjectStoreInterMineImpl.
  *
  * @throws ObjectStoreException if ObjectStoreInterMineImpl.goFaster() throws the exception
  */
 public synchronized void goFaster() throws ObjectStoreException {
   goingFaster++;
   if (goingFaster == 1) {
     osResults = changeResultBatchSize(osResults, BIG_BATCH_SIZE);
     ObjectStore os = osResults.getObjectStore();
     if (os instanceof ObjectStoreInterMineImpl) {
       ((ObjectStoreInterMineImpl) os).goFaster(osResults.getQuery());
     }
   }
 }
Пример #3
0
 /**
  * Returns the ObjectStore's maximum allowable offset.
  *
  * @return an int
  */
 public int getMaxRetrievableIndex() {
   return osResults.getObjectStore().getMaxOffset();
 }
Пример #4
0
 /**
  * Make a copy of a Results object, but with a different batch size.
  *
  * @param oldResults the original Results objects
  * @param newBatchSize the new batch size
  * @return a new Results object with a new batch size
  */
 private Results changeResultBatchSize(Results oldResults, int newBatchSize) {
   Results newResults =
       oldResults.getObjectStore().execute(oldResults.getQuery(), newBatchSize, true, true, true);
   return newResults;
 }