private StartContainerRequestProto convertToProtoFormat( StartContainerRequest t) { return ((StartContainerRequestPBImpl) t).getProto(); } }
private StartContainerRequestProto convertToProtoFormat( StartContainerRequest t) { return ((StartContainerRequestPBImpl) t).getProto(); } }
private StartContainerRequestProto convertToProtoFormat( StartContainerRequest t) { return ((StartContainerRequestPBImpl) t).getProto(); } }
@Override public String toString() { return TextFormat.shortDebugString(getProto()); }
@Override public String toString() { return TextFormat.shortDebugString(getProto()); }
@Override public int hashCode() { return getProto().hashCode(); }
@Override public int hashCode() { return getProto().hashCode(); }
@Override public int hashCode() { return getProto().hashCode(); }
@Override public String toString() { return TextFormat.shortDebugString(getProto()); }
@Override public void storeContainer(ContainerId containerId, StartContainerRequest startRequest) throws IOException { String key = CONTAINERS_KEY_PREFIX + containerId.toString() + CONTAINER_REQUEST_KEY_SUFFIX; try { db.put(bytes(key), ((StartContainerRequestPBImpl) startRequest).getProto().toByteArray()); } catch (DBException e) { throw new IOException(e); } }
@Override public void storeContainer(ContainerId containerId, StartContainerRequest startRequest) throws IOException { String key = CONTAINERS_KEY_PREFIX + containerId.toString() + CONTAINER_REQUEST_KEY_SUFFIX; try { db.put(bytes(key), ((StartContainerRequestPBImpl) startRequest).getProto().toByteArray()); } catch (DBException e) { throw new IOException(e); } }
@Override public void storeContainer(ContainerId containerId, int containerVersion, StartContainerRequest startRequest) throws IOException { String idStr = containerId.toString(); if (LOG.isDebugEnabled()) { LOG.debug("storeContainer: containerId= " + idStr + ", startRequest= " + startRequest); } String keyRequest = CONTAINERS_KEY_PREFIX + idStr + CONTAINER_REQUEST_KEY_SUFFIX; String keyVersion = getContainerVersionKey(idStr); try { WriteBatch batch = db.createWriteBatch(); try { batch.put(bytes(keyRequest), ((StartContainerRequestPBImpl) startRequest) .getProto().toByteArray()); if (containerVersion != 0) { batch.put(bytes(keyVersion), bytes(Integer.toString(containerVersion))); } db.write(batch); } finally { batch.close(); } } catch (DBException e) { throw new IOException(e); } }
getContainerKey(idStr, CONTAINER_REQUEST_KEY_SUFFIX); final StartContainerRequestProto startContainerRequest = ((StartContainerRequestPBImpl) startRequest).getProto();