/** * Switches off the goFaster mode in the objectstore for this query. * * @throws RuntimeException if something goes wrong */ public void releaseGoFaster() { try { if (isGoingFaster) { ((ObjectStoreInterMineImpl) results.getObjectStore()).releaseGoFaster(results .getQuery()); } } catch (ObjectStoreException ex) { LOG.warn("Error happened during executing releaseGoFaster method.", ex); } }
/** * Switches off the goFaster mode in the objectstore for this query. * * @throws RuntimeException if something goes wrong */ public void releaseGoFaster() { try { if (isGoingFaster) { ((ObjectStoreInterMineImpl) results.getObjectStore()).releaseGoFaster(results .getQuery()); } } catch (ObjectStoreException ex) { LOG.warn("Error happened during executing releaseGoFaster method.", ex); } }
/** * 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()); } } }
/** * 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()); } } }
((ObjectStoreInterMineImpl) os).releaseGoFaster(resultsContainer.getResults() .getQuery());
((ObjectStoreInterMineImpl) os).releaseGoFaster(resultsContainer.getResults() .getQuery());
if (doGoFaster) { if (os instanceof ObjectStoreInterMineImpl) { ((ObjectStoreInterMineImpl) os).releaseGoFaster(q);
@Test public void testGoFaster() throws Exception { Query q = new IqlQuery("SELECT Company, Department FROM Company, Department WHERE Department.company CONTAINS Company", "org.intermine.model.testmodel").toQuery(); try { ((ObjectStoreInterMineImpl) os).goFaster(q); Results r = os.execute(q); r.get(0); Assert.assertEquals(3, r.size()); } finally { ((ObjectStoreInterMineImpl) os).releaseGoFaster(q); } }