public synchronized boolean addSampler(Sampler sampler){
  if (tracerPool == null) {
    throwClientError(toString() + " is closed.");
  }
  Sampler[] samplers=curSamplers;
  for (int i=0; i < samplers.length; i++) {
    if (samplers[i] == sampler) {
      return false;
    }
  }
  Sampler[] newSamplers=Arrays.copyOf(samplers,samplers.length + 1);
  newSamplers[samplers.length]=sampler;
  curSamplers=newSamplers;
  return true;
}

public synchronized boolean addSampler ( Sampler sampler ) { if ( tracerPool == null ) { throwClientError ( toString ( ) + " is closed." ) ; } Sampler [ ] samplers = curSamplers ; for ( int i = 0 ; i < samplers . length ; i ++ ) { if ( samplers [ i ] == sampler ) { return false ; } } Sampler [ ] newSamplers = Arrays . copyOf ( samplers , samplers . length + 1 ) ; newSamplers [ samplers . length ] = sampler ; curSamplers = newSamplers ; return true ; }
add a new sampler .
