code: private void recordIndex(int index) {
          stateLock.writeLock().lock();
          try {
              int insertionPoint = -Arrays.binarySearch(effectiveIndex, index) - 1;
              System.arraycopy(effectiveIndex, insertionPoint, effectiveIndex, insertionPoint + 1, effectiveIndex.length - insertionPoint - 1);
              effectiveIndex[insertionPoint] = index;
          } finally {
              stateLock.writeLock().unlock();
          }
      }
docs: Insert <code>index</code> into the {@link #effectiveIndex} array,
  preserving the natural ordering, and shifting successive elements to the right