Add java-doc for implemented methods of io.netty.util.concurrent.Future#cancel(boolean mayInterruptIfRunning)
Motivation: The methods implement io.netty.util.concurrent.Future#cancel(boolean mayInterruptIfRunning) which actually ignored the param mayInterruptIfRunning.We need to add comments for the `mayInterruptIfRunning` param. Modifications: Add comments for the `mayInterruptIfRunning` param. Result: People who call the `cancel` method will be more clear about the effect of `mayInterruptIfRunning` param.
This commit is contained in:
parent
f5f7e6f9e5
commit
16239d4ea3
|
@ -140,6 +140,11 @@ public abstract class CompleteFuture<V> extends AbstractFuture<V> {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param mayInterruptIfRunning this value has no effect in this implementation.
|
||||
*/
|
||||
@Override
|
||||
public boolean cancel(boolean mayInterruptIfRunning) {
|
||||
return false;
|
||||
|
|
|
@ -308,6 +308,11 @@ public class DefaultPromise<V> extends AbstractFuture<V> implements Promise<V> {
|
|||
return (V) result;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param mayInterruptIfRunning this value has no effect in this implementation.
|
||||
*/
|
||||
@Override
|
||||
public boolean cancel(boolean mayInterruptIfRunning) {
|
||||
if (RESULT_UPDATER.compareAndSet(this, null, CANCELLATION_CAUSE_HOLDER)) {
|
||||
|
|
|
@ -146,6 +146,11 @@ final class ScheduledFutureTask<V> extends PromiseTask<V> implements ScheduledFu
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param mayInterruptIfRunning this value has no effect in this implementation.
|
||||
*/
|
||||
@Override
|
||||
public boolean cancel(boolean mayInterruptIfRunning) {
|
||||
boolean canceled = super.cancel(mayInterruptIfRunning);
|
||||
|
|
|
@ -164,6 +164,11 @@ final class VoidChannelPromise extends AbstractFuture<Void> implements ChannelPr
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param mayInterruptIfRunning this value has no effect in this implementation.
|
||||
*/
|
||||
@Override
|
||||
public boolean cancel(boolean mayInterruptIfRunning) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue