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
1c7125750b
commit
9dd5c928f3
@ -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)) {
|
||||
|
@ -151,6 +151,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);
|
||||
|
@ -179,6 +179,11 @@ public final class VoidChannelPromise extends AbstractFuture<Void> implements Ch
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param mayInterruptIfRunning this value has no effect in this implementation.
|
||||
*/
|
||||
@Override
|
||||
public boolean cancel(boolean mayInterruptIfRunning) {
|
||||
return false;
|
||||
|
@ -138,6 +138,11 @@ final class VoidChannelGroupFuture implements ChannelGroupFuture {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param mayInterruptIfRunning this value has no effect in this implementation.
|
||||
*/
|
||||
@Override
|
||||
public boolean cancel(boolean mayInterruptIfRunning) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user