/** Writes all outstanding updates to the last document fetched from the pipeline. */ public boolean saveCurrentDocument() throws IOException, JsonException { boolean keepingLock = keepLock; if (currentDocument == null) { InternalLogger.error("There is no document to write."); return false; } boolean x = save(currentDocument); if (x && !keepingLock) { currentDocument = null; } return x; }
private static void logUnexpected(HttpResponse response) throws IOException { InternalLogger.error("Node gave an unexpected response: " + response.getStatusLine()); InternalLogger.error("Message: " + EntityUtils.toString(response.getEntity())); }