public DB<K, V> create() { if (serializer == null) { this.serializer = new JsonStoreSerializer(); } if (storeConfig.getDbPath() == null) { storeConfig.setDbPath(new File(Constants.USER_HOME)); } storeConfig.setDataPath(new File(storeConfig.getDbPath(), "data")); storeConfig.setLogPath(new File(storeConfig.getDbPath(), "logs")); storeConfig.setIndexPath(new File(storeConfig.getDbPath(), "index")); return new DBImpl<K, V>(serializer, storeConfig); }
public DB<K, V> create() { if (serializer == null) { this.serializer = new JsonStoreSerializer(); } if (storeConfig.getDbPath() == null) { storeConfig.setDbPath(new File(Constants.USER_HOME)); } storeConfig.setDataPath(new File(storeConfig.getDbPath(), "data")); storeConfig.setLogPath(new File(storeConfig.getDbPath(), "logs")); storeConfig.setIndexPath(new File(storeConfig.getDbPath(), "index")); return new DBImpl<K, V>(serializer, storeConfig); }
public void init() throws DBException { try { FileUtils.createDirIfNotExist(storeConfig.getDbPath()); storeTxLogEngine.init(); dataBlockEngine.init(); indexSnapshot.init(); } catch (Exception e) { throw new DBException("DB init error:" + e.getMessage(), e); } }
public void init() throws DBException { try { FileUtils.createDirIfNotExist(storeConfig.getDbPath()); storeTxLogEngine.init(); dataBlockEngine.init(); indexSnapshot.init(); } catch (Exception e) { throw new DBException("DB init error:" + e.getMessage(), e); } }
public DB<K, V> create() { if (serializer == null) { this.serializer = new JsonStoreSerializer(); } if (storeConfig.getDbPath() == null) { storeConfig.setDbPath(new File(Constants.USER_HOME)); } storeConfig.setDataPath(new File(storeConfig.getDbPath(), "data")); storeConfig.setLogPath(new File(storeConfig.getDbPath(), "logs")); storeConfig.setIndexPath(new File(storeConfig.getDbPath(), "index")); return new DBImpl<K, V>(serializer, storeConfig); }
public void init() throws DBException { try { FileUtils.createDirIfNotExist(storeConfig.getDbPath()); storeTxLogEngine.init(); dataBlockEngine.init(); indexSnapshot.init(); } catch (Exception e) { throw new DBException("DB init error:" + e.getMessage(), e); } }