private void ensureFDCapacity(int idx){
  if (idx >= failureDetectionPorts.length) {
    int[] p=new int[idx + 10];
    if (failureDetectionPorts.length > 0) {
      System.arraycopy(failureDetectionPorts,0,p,0,failureDetectionPorts.length);
    }
    Arrays.fill(p,idx,idx + 9,-1);
    failureDetectionPorts=p;
  }
}

private void ensureFDCapacity ( int idx ) { if ( idx >= failureDetectionPorts . length ) { int [ ] p = new int [ idx + 10 ] ; if ( failureDetectionPorts . length > 0 ) { System . arraycopy ( failureDetectionPorts , 0 , p , 0 , failureDetectionPorts . length ) ; } Arrays . fill ( p , idx , idx + 9 , - 1 ) ; failureDetectionPorts = p ; } }
ensures that there is a slot at idx to store an int
