src/main/java/org/jboss/util/timeout/HashedTimeoutPriorityQueueImpl.java
/**
       *  A new node has been added at index <code>index</code>.
       *  Normalize the tree by moving the new node up the tree.
       *
       *  @return true if the tree was modified.
       */
A new node has been added at index index.
Normalize the tree by moving the new node up the tree.

@return true if the tree was modified.
A new node has been added at index index . Normalize the tree by moving the new node up the tree . @return true if the tree was modified .
private boolean normalizeUp(int index)
      {
         if (index == 1)
            return false; 
         boolean ret = false;
         long t = queue[index].time;
         int p = index >> 1;
         while (queue[p].time > t)
         {
            swap(p, index);
            ret = true;
            if (p == 1)
               break; 
            index = p;
            p >>= 1;
         }
         return ret;
      }
private boolean normalizeUp ( int index ) { if ( index == 1 ) return false ; boolean ret = false ; long t = queue [ index ] . time ; int p = index >> 1 ; while ( queue [ p ] . time > t ) { swap ( p , index ) ; ret = true ; if ( p == 1 ) break ; index = p ; p >>= 1 ; } return ret ; }
A new node has been added at index <code>index</code>.
A new node has been added at index <code > index< / code > .
// INV: assertExpr(index > 0); // INV: assertExpr(index <= size); // INV: assertExpr(queue[index] != null); // at root // INV: assertExpr(queue[index].time == t); // at root