832 |
|
private final Condition available = lock.newCondition(); |
833 |
|
|
834 |
|
/** |
835 |
< |
* Set f's heapIndex if it is a ScheduledFutureTask. |
835 |
> |
* Sets f's heapIndex if it is a ScheduledFutureTask. |
836 |
|
*/ |
837 |
|
private void setIndex(RunnableScheduledFuture<?> f, int idx) { |
838 |
|
if (f instanceof ScheduledFutureTask) |
840 |
|
} |
841 |
|
|
842 |
|
/** |
843 |
< |
* Sift element added at bottom up to its heap-ordered spot. |
843 |
> |
* Sifts element added at bottom up to its heap-ordered spot. |
844 |
|
* Call only when holding lock. |
845 |
|
*/ |
846 |
|
private void siftUp(int k, RunnableScheduledFuture<?> key) { |
858 |
|
} |
859 |
|
|
860 |
|
/** |
861 |
< |
* Sift element added at top down to its heap-ordered spot. |
861 |
> |
* Sifts element added at top down to its heap-ordered spot. |
862 |
|
* Call only when holding lock. |
863 |
|
*/ |
864 |
|
private void siftDown(int k, RunnableScheduledFuture<?> key) { |
880 |
|
} |
881 |
|
|
882 |
|
/** |
883 |
< |
* Resize the heap array. Call only when holding lock. |
883 |
> |
* Resizes the heap array. Call only when holding lock. |
884 |
|
*/ |
885 |
|
private void grow() { |
886 |
|
int oldCapacity = queue.length; |
891 |
|
} |
892 |
|
|
893 |
|
/** |
894 |
< |
* Find index of given object, or -1 if absent |
894 |
> |
* Finds index of given object, or -1 if absent. |
895 |
|
*/ |
896 |
|
private int indexOf(Object x) { |
897 |
|
if (x != null) { |
1132 |
|
} |
1133 |
|
|
1134 |
|
/** |
1135 |
< |
* Return first element only if it is expired. |
1135 |
> |
* Returns first element only if it is expired. |
1136 |
|
* Used only by drainTo. Call only when holding lock. |
1137 |
|
*/ |
1138 |
|
private RunnableScheduledFuture<?> peekExpired() { |