public synchronized void addChildContext(String childContextName, final MetricContext childContext)
      throws NameConflictException, ExecutionException {
    if (this.children.get(childContextName, new Callable<MetricContext>() {
      @Override
      public MetricContext call() throws Exception {
        return childContext;
      }
    }) != childContext) {
      throw new NameConflictException("A child context with that name already exists.");
    }
  }
public synchronized void addChildContext ( String childContextName , final MetricContext childContext ) throws NameConflictException , ExecutionException { if ( this . children . get ( childContextName , new Callable < MetricContext > ( ) { @ Override public MetricContext call ( ) throws Exception { return childContext ; } } ) != childContext ) { throw new NameConflictException ( "A child context with that name already exists." ) ; } }
Add a {@link MetricContext} as a child of this {@link MetricContext} if it is not currently a child.

@param childContextName the name of the child {@link MetricContext}
@param childContext the child {@link MetricContext} to add