Beispiel #1
0
  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();

    sb.append("ReplyMessage{responseTo=")
        .append(responseTo)
        .append(", cursorNotFound=")
        .append(cursorNotFound)
        .append(", queryFailure=")
        .append(queryFailure)
        .append(", shardConfigStale=")
        .append(shardConfigStale)
        .append(", awaitCapable=")
        .append(awaitCapable)
        .append(", cursorId=")
        .append(cursorId)
        .append(", startingFrom=")
        .append(startingFrom);

    if (dataContext.isValid()) {
      // TODO: This must be changed to preserve privacy on logs
      int docsLimit = 10;
      sb.append(", documents (limited to ")
          .append(docsLimit)
          .append(")=")
          .append(Iterables.toString(documents.getIterable(AllocationType.HEAP).limit(docsLimit)));
    } else {
      sb.append(", documents=<not available>");
    }
    return sb.append('}').toString();
  }
Beispiel #2
0
 @Override
 public void close() throws Exception {
   dataContext.close();
 }