Just some tiny javadocs optimizations
This commit is contained in:
parent
32b671f4dc
commit
7254a5c2c6
@ -24,6 +24,9 @@ import java.nio.channels.GatheringByteChannel;
|
||||
import java.nio.channels.ScatteringByteChannel;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
/**
|
||||
* Wrapper which swap the {@link ByteOrder} of a {@link ByteBuf}.
|
||||
*/
|
||||
public final class SwappedByteBuf extends ByteBuf {
|
||||
|
||||
private final ByteBuf buf;
|
||||
|
@ -34,6 +34,9 @@ public abstract class CompleteFuture<V> extends AbstractFuture<V> {
|
||||
this.executor = executor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the {@link EventExecutor} which is used by this {@link CompleteFuture}.
|
||||
*/
|
||||
protected EventExecutor executor() {
|
||||
return executor;
|
||||
}
|
||||
|
@ -1,84 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012 The Netty Project
|
||||
*
|
||||
* The Netty Project licenses this file to you under the Apache License,
|
||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.util.concurrent;
|
||||
|
||||
|
||||
public abstract class CompletePromise<V> extends CompleteFuture<V> implements Promise<V> {
|
||||
|
||||
protected CompletePromise(EventExecutor executor) {
|
||||
super(executor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> setFailure(Throwable cause) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean tryFailure(Throwable cause) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> setSuccess(V result) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean trySuccess(V result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> await() throws InterruptedException {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> awaitUninterruptibly() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> syncUninterruptibly() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> sync() throws InterruptedException {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> addListener(GenericFutureListener<? extends Future<? super V>> listener) {
|
||||
return (Promise<V>) super.addListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> addListeners(GenericFutureListener<? extends Future<? super V>>... listeners) {
|
||||
return (Promise<V>) super.addListeners(listeners);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> removeListener(GenericFutureListener<? extends Future<? super V>> listener) {
|
||||
return (Promise<V>) super.removeListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Promise<V> removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners) {
|
||||
return (Promise<V>) super.removeListeners(listeners);
|
||||
}
|
||||
}
|
@ -23,10 +23,19 @@ import java.util.concurrent.ThreadFactory;
|
||||
*/
|
||||
public class DefaultEventExecutorGroup extends MultithreadEventExecutorGroup {
|
||||
|
||||
/**
|
||||
* @see {@link #DefaultEventExecutorGroup(int, ThreadFactory)}
|
||||
*/
|
||||
public DefaultEventExecutorGroup(int nThreads) {
|
||||
this(nThreads, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
* @param nThreads the number of threads that will be used by this instance.
|
||||
* @param threadFactory the ThreadFactory to use, or {@code null} if the default should be used.
|
||||
*/
|
||||
public DefaultEventExecutorGroup(int nThreads, ThreadFactory threadFactory) {
|
||||
super(nThreads, threadFactory);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user