98 |
|
/** |
99 |
|
* Sets the result of this Future to the given value unless |
100 |
|
* this future has already been set or has been cancelled. |
101 |
+ |
* This method is invoked internally by the <tt>run</tt> method |
102 |
+ |
* upon successful completion of the computation. |
103 |
|
* @param v the value |
104 |
|
*/ |
105 |
|
protected void set(V v) { |
110 |
|
* Causes this future to report an <tt>ExecutionException</tt> |
111 |
|
* with the given throwable as its cause, unless this Future has |
112 |
|
* already been set or has been cancelled. |
113 |
+ |
* This method is invoked internally by the <tt>run</tt> method |
114 |
+ |
* upon failure of the computation. |
115 |
|
* @param t the cause of failure. |
116 |
|
*/ |
117 |
|
protected void setException(Throwable t) { |
118 |
|
sync.innerSetException(t); |
119 |
|
} |
120 |
|
|
117 |
– |
/** |
118 |
– |
* Sets this Future to the result of computation unless |
119 |
– |
* it has been cancelled. |
120 |
– |
*/ |
121 |
|
public void run() { |
122 |
|
sync.innerRun(); |
123 |
|
} |