code: public int getEvictionIndex() {
      /*
       * If the table has been shrunk then it's possible for the clock-hand to
       * point past the end of the table.  We cannot allow the initial-hand to
       * be equal to this otherwise we may never be able to terminate this loop.
       */
      if (clockHand >= hashtable.capacity()) {
        clockHand = 0;
      }
  
      int initialHand = clockHand;
      int loops = 0;
      while (true) {
        if ((clockHand += ENTRY_SIZE) + STATUS >= hashtable.capacity()) {
          clockHand = 0;
        }
  
        int hand = hashtable.get(clockHand + STATUS);
  
        if (evictable(hand) && ((hand & PRESENT_CLOCK) == 0)) {
          return clockHand;
        } else if ((hand & PRESENT_CLOCK) == PRESENT_CLOCK) {
          hashtable.put(clockHand + STATUS, hand & ~PRESENT_CLOCK);
        }
  
        if (initialHand == clockHand && ++loops == 2) {
          return -1;
        }
      }
    }
docs: Return the table offset of the to be evicted mapping.
  <p>
  The mapping to be evicted can occur anywhere in this cache's table.
  
  @return table offset of the mapping to be evicted