Ejemplo n.º 1
0
  /** 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;
  }
Ejemplo n.º 2
0
 private static void logUnexpected(HttpResponse response) throws IOException {
   InternalLogger.error("Node gave an unexpected response: " + response.getStatusLine());
   InternalLogger.error("Message: " + EntityUtils.toString(response.getEntity()));
 }