@VisibleForTesting void storeVersion(Version state) throws IOException { byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { db.put(TIMELINE_STATE_STORE_VERSION_KEY, data); } catch (DBException e) { throw new IOException(e); } }
private void dbStoreVersion(Version state) throws IOException { String key = DB_SCHEMA_VERSION_KEY; byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { db.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
private void dbStoreVersion(Version state) throws IOException { String key = TIMELINE_STORE_VERSION_KEY; byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { db.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
@Override public void storeVersion() throws Exception { String key = VERSION_KEY; byte[] data = ((VersionPBImpl) CURRENT_VERSION_INFO).getProto() .toByteArray(); try { db.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
@Override protected synchronized void storeVersion() throws Exception { Path versionNodePath = getNodePath(rootDirPath, VERSION_NODE); byte[] data = ((VersionPBImpl) CURRENT_VERSION_INFO).getProto().toByteArray(); if (existsWithRetries(versionNodePath)) { updateFile(versionNodePath, data, false); } else { writeFileWithRetries(versionNodePath, data, false); } }
void dbStoreVersion(Version state) throws IOException { String key = DB_SCHEMA_VERSION_KEY; byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { db.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
private void dbStoreVersion(Version state) throws IOException { String key = TIMELINE_STORE_VERSION_KEY; byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { starttimedb.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
@Override protected synchronized void storeVersion() throws Exception { String versionNodePath = getNodePath(zkRootNodePath, VERSION_NODE); byte[] data = ((VersionPBImpl) CURRENT_VERSION_INFO).getProto().toByteArray(); if (exists(versionNodePath)) { zkManager.safeSetData(versionNodePath, data, -1, zkAcl, fencingNodePath); } else { zkManager.safeCreate(versionNodePath, data, zkAcl, CreateMode.PERSISTENT, zkAcl, fencingNodePath); } }
void dbStoreVersion(Version state) throws IOException { String key = VERSION_NODE; byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { db.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
@Override protected synchronized void storeVersion() throws Exception { String versionNodePath = getNodePath(zkRootNodePath, VERSION_NODE); byte[] data = ((VersionPBImpl) CURRENT_VERSION_INFO).getProto().toByteArray(); if (existsWithRetries(versionNodePath, false) != null) { setDataWithRetries(versionNodePath, data, -1); } else { createWithRetries(versionNodePath, data, zkAcl, CreateMode.PERSISTENT); } }
@Override public void writeVersion(Version version) throws Exception { client.setData(store.getVersionNode(), ((VersionPBImpl) version) .getProto().toByteArray(), -1); }
@Override protected synchronized void storeVersion() throws Exception { Path versionNodePath = getNodePath(rootDirPath, VERSION_NODE); byte[] data = ((VersionPBImpl) CURRENT_VERSION_INFO).getProto().toByteArray(); if (existsWithRetries(versionNodePath)) { updateFile(versionNodePath, data, false); } else { writeFileWithRetries(versionNodePath, data, false); } }
void dbStoreVersion(Version state) throws IOException { String key = DB_SCHEMA_VERSION_KEY; byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { db.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
void dbStoreVersion(Version state) throws IOException { String key = DB_SCHEMA_VERSION_KEY; byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { db.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
@Override protected synchronized void storeVersion() throws Exception { Path versionNodePath = getNodePath(rootDirPath, VERSION_NODE); byte[] data = ((VersionPBImpl) CURRENT_VERSION_INFO).getProto().toByteArray(); if (existsWithRetries(versionNodePath)) { updateFile(versionNodePath, data, false); } else { writeFileWithRetries(versionNodePath, data, false); } }
private void dbStoreVersion(Version state) throws IOException { String key = TIMELINE_STORE_VERSION_KEY; byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { db.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
private void dbStoreVersion(Version state) throws IOException { String key = DB_SCHEMA_VERSION_KEY; byte[] data = ((VersionPBImpl) state).getProto().toByteArray(); try { db.put(bytes(key), data); } catch (DBException e) { throw new IOException(e); } }
private void storeSchemaVersion(Version version) throws IOException { String key = STATE_DB_SCHEMA_VERSION_KEY; byte[] data = ((VersionPBImpl) version).getProto().toByteArray(); try { stateDb.put(bytes(key), data); } catch (DBException e) { throw new IOException(e.getMessage(), e); } }
@Override public void writeVersion(Version version) throws Exception { curatorFramework.setData().withVersion(-1) .forPath(store.getVersionNode(), ((VersionPBImpl) version).getProto().toByteArray()); }
@Override public void writeVersion(Version version) throws Exception { store.updateFile(store.getVersionNode(), ((VersionPBImpl) version) .getProto().toByteArray(), false); }