/** * Cleanup any state for this DB. Called once per DB instance; there is one * DB instance per client thread. * * Actually, one client process will share one DB instance here.(Coincide to * mongoDB driver) */ @Override public void cleanup() throws DBException { if (INIT_COUNT.decrementAndGet() == 0) { arangoDB.shutdown(); arangoDB = null; logger.info("Local cleaned up."); } }
@Override public void close() { arangoDB.shutdown(); }
@Override public void close() { arangoDB.shutdown(); arangoDBAsync.shutdown(); } }
/** * Shutdown the client and free resources. */ public void shutdown() { logger.debug("Shutdown"); if (db != null) { if (db.exists()) { db.clearQueryCache(); } } if (driver != null) driver.shutdown(); db = null; driver = null; }