Codota Logo
TraceNode.addChild
Code IndexAdd Codota to your IDE (free)

How to use
addChild
method
in
com.yahoo.messagebus.TraceNode

Best Java code snippets using com.yahoo.messagebus.TraceNode.addChild (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: com.yahoo.vespa/messagebus

/**
 * Adds a list of child nodes to this.
 *
 * @param children The children to add.
 * @return This, to allow chaining.
 */
public TraceNode addChildren(List<TraceNode> children) {
  for (TraceNode child : children) {
    addChild(child);
  }
  return this;
}
origin: com.yahoo.vespa/messagebus

  addChild(child);
} else if (strict == child.strict) {
  addChildren(child.children);
    addChild(grandChild);
  } else {
    addChildren(grandChild.children);
  addChild(child);
origin: com.yahoo.vespa/messagebus

/**
 * Convenience method to add a child node containing a note to this.
 *
 * @param note The note to assign to the child.
 * @return This, to allow chaining.
 */
public TraceNode addChild(String note) {
  return addChild(new TraceNode(note));
}
origin: com.yahoo.vespa/messagebus

  root.addChild(buf.toString());
} else {
  root.addChild(note);
origin: com.yahoo.vespa/messagebus

/**
 * Normalize this tree. This will transform all equivalent trees into the same form. Note that this will also
 * perform an implicit compaction of the tree.
 *
 * @return This, to allow chaining.
 */
public TraceNode normalize() {
  compact();
  sort();
  if (note != null || !strict) {
    TraceNode child = new TraceNode();
    child.swap(this);
    addChild(child);
    strict = true;
  }
  return this;
}
origin: com.yahoo.vespa/messagebus

  inEscape = true;
} else if (c == ']') {
  node.addChild(note.toString());
  note = null;
} else {
  note = new StringBuilder();
} else if (c == '(' || c == '{') {
  node.addChild(new TraceNode());
  node = node.getChild(node.getNumChildren() - 1);
  node.setStrict(c == '(');
origin: com.yahoo.vespa/docproc

@Override
public ContentChannel handleResponse(Response response) {
  synchronized (this) {
    if (response instanceof MbusResponse) {
      Reply reply = ((MbusResponse)response).getReply();
      requestTrace.addChild(reply.getTrace().getRoot());
      replies.add(reply);
    }
    if (--numPending != 0) {
      return null;
    }
  }
  requestMsg.getTrace().getRoot().addChild(requestTrace);
  Reply reply = DocumentProtocol.merge(replies);
  Response mbusResponse = new MbusResponse(StatusCodes.fromMbusReply(reply), reply);
  ResponseDispatch.newInstance(mbusResponse).dispatch(responseHandler);
  return null;
}
origin: com.yahoo.vespa/messagebus

/**
 * Sets the reply of this routing node. This method also updates the internal state of this node; it is tagged for
 * resending if the reply has only transient errors, and the reply's {@link Trace} is copied. This method <u>does
 * not</u> call the parent node's {@link #notifyMerge()}.
 *
 * @param reply The reply to set.
 */
public void setReply(Reply reply) {
  if (reply != null) {
    shouldRetry = resender != null && resender.shouldRetry(reply);
    trace.getRoot().addChild(reply.getTrace().getRoot());
    reply.getTrace().clear();
  }
  this.reply = reply;
}
origin: com.yahoo.vespa/documentapi

private void handleCreateVisitorReply(CreateVisitorReply reply) {
  CreateVisitorMessage msg = (CreateVisitorMessage)reply.getMessage();
  BucketId superbucket = msg.getBuckets().get(0);
  BucketId subBucketProgress = reply.getLastBucket();
  log.log(LogLevel.DEBUG, sessionName + ": received CreateVisitorReply for bucket " +
      superbucket + " with progress " + subBucketProgress);
  progress.getIterator().update(superbucket, subBucketProgress);
  params.getControlHandler().onProgress(progress.getToken());
  statistics.add(reply.getVisitorStatistics());
  params.getControlHandler().onVisitorStatistics(statistics);
  trace.getRoot().addChild(reply.getTrace().getRoot());
  if (params.getDynamicallyIncreaseMaxBucketsPerVisitor()
      && (reply.getVisitorStatistics().getDocumentsReturned()
        < params.getMaxFirstPassHits() / 2.0))
  {
    // Attempt to increase parallelism to reduce latency of visiting
    // Ensure new count is within [1, 128]
    int newMaxBuckets = Math.max(Math.min((int)(params.getMaxBucketsPerVisitor()
        * params.getDynamicMaxBucketsIncreaseFactor()), 128), 1);
    params.setMaxBucketsPerVisitor(newMaxBuckets);
    log.log(LogLevel.DEBUG, sessionName + ": increasing max buckets per visitor to "
        + params.getMaxBucketsPerVisitor());
  }
}
origin: com.yahoo.vespa/messagebus

for (RoutingNode child : children) {
  TraceNode root = child.trace.getRoot();
  tail.addChild(root);
  root.clear();
trace.getRoot().addChild(tail);
origin: com.yahoo.vespa/messagebus

  trace.swap(empty);
} else if (trace.getLevel() > 0) {
  trace.getRoot().addChild(reply.getTrace().getRoot());
  trace.getRoot().normalize();
origin: com.yahoo.vespa/messagebus

  @Override
  public void run() {
    Reply reply = decode(envelope.reply.getProtocol(), payload, Reply.class);
    reply.setRetryDelay(envelope.reply.getRetryDelay());
    reply.getTrace().getRoot().addChild(TraceNode.decode(envelope.reply.getTrace().getRoot().encode()));
    for (int i = 0, len = envelope.reply.getNumErrors(); i < len; ++i) {
      Error error = envelope.reply.getError(i);
      reply.addError(new Error(error.getCode(),
                   error.getMessage(),
                   error.getService() != null ? error.getService() : envelope.sender.hostId));
    }
    owner.deliverReply(reply, envelope.parent.recipient);
  }
});
origin: com.yahoo.vespa/messagebus

trace.getRoot().addChild(TraceNode.decode(replyTrace));
origin: com.yahoo.vespa/messagebus

trace.getRoot().addChild(TraceNode.decode(root.field(TRACE_F).asString()));
com.yahoo.messagebusTraceNodeaddChild

Javadoc

Adds a child node to this.

Popular methods of TraceNode

  • <init>
    Create a leaf node with the given note.
  • addChildren
    Adds a list of child nodes to this.
  • clear
    Remove all trace information from this tree.
  • compact
    Compact this tree. This will reduce the height of this tree as much as possible without removing inf
  • compareTo
  • decode
    Build a trace tree from the given string representation (possibly encoded using #encode()).
  • encode
    Writes a parseable string representation of this trace node to the given string builder.
  • getChild
    Returns the child trace node at the given index.
  • getNote
    Returns the note assigned to this node.
  • getNumChildren
    Returns the number of child nodes of this.
  • isEmpty
    Check whether or not this node is empty, i.e. it has no note and no children.
  • isLeaf
    Check whether or not this is a leaf node.
  • isEmpty,
  • isLeaf,
  • isStrict,
  • normalize,
  • setStrict,
  • sort,
  • swap,
  • toString,
  • writeString

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now