Mark OIO based transports as deprecated as preparation for removal in Netty 5. (#8579)

Motivation:

We plan to remove the OIO based transports in Netty 5 so we should mark these as deprecated already.

Modifications:

Mark all OIO based transports as deprecated.

Result:

Give the user a heads-up for removal.
This commit is contained in:
Norman Maurer 2018-11-21 15:15:01 +01:00
parent 99aa51b74a
commit 6650b325ad
20 changed files with 58 additions and 0 deletions

View File

@ -58,7 +58,10 @@ import java.util.Set;
* *
* Be aware that not all operations systems support SCTP. Please refer to the documentation of your operation system, * Be aware that not all operations systems support SCTP. Please refer to the documentation of your operation system,
* to understand what you need to do to use it. Also this feature is only supported on Java 7+. * to understand what you need to do to use it. Also this feature is only supported on Java 7+.
*
* @deprecated use {@link io.netty.channel.sctp.nio.NioSctpChannel}.
*/ */
@Deprecated
public class OioSctpChannel extends AbstractOioMessageChannel public class OioSctpChannel extends AbstractOioMessageChannel
implements io.netty.channel.sctp.SctpChannel { implements io.netty.channel.sctp.SctpChannel {

View File

@ -46,7 +46,10 @@ import java.util.Set;
* *
* Be aware that not all operations systems support SCTP. Please refer to the documentation of your operation system, * Be aware that not all operations systems support SCTP. Please refer to the documentation of your operation system,
* to understand what you need to do to use it. Also this feature is only supported on Java 7+. * to understand what you need to do to use it. Also this feature is only supported on Java 7+.
*
* @deprecated use {@link io.netty.channel.sctp.nio.NioSctpServerChannel}.
*/ */
@Deprecated
public class OioSctpServerChannel extends AbstractOioMessageChannel public class OioSctpServerChannel extends AbstractOioMessageChannel
implements io.netty.channel.sctp.SctpServerChannel { implements io.netty.channel.sctp.SctpServerChannel {

View File

@ -17,5 +17,8 @@
/** /**
* Old blocking I/O based SCTP channel API implementation - recommended for * Old blocking I/O based SCTP channel API implementation - recommended for
* a small number of connections (< 1000). * a small number of connections (< 1000).
*
* @deprecated use NIO based SCTP implementation.
*/ */
@Deprecated
package io.netty.channel.sctp.oio; package io.netty.channel.sctp.oio;

View File

@ -19,7 +19,9 @@ package io.netty.channel;
* {@link SingleThreadEventLoop} which is used to handle OIO {@link Channel}'s. So in general there will be * {@link SingleThreadEventLoop} which is used to handle OIO {@link Channel}'s. So in general there will be
* one {@link ThreadPerChannelEventLoop} per {@link Channel}. * one {@link ThreadPerChannelEventLoop} per {@link Channel}.
* *
* @deprecated this will be remove in the next-major release.
*/ */
@Deprecated
public class ThreadPerChannelEventLoop extends SingleThreadEventLoop { public class ThreadPerChannelEventLoop extends SingleThreadEventLoop {
private final ThreadPerChannelEventLoopGroup parent; private final ThreadPerChannelEventLoopGroup parent;

View File

@ -42,7 +42,10 @@ import java.util.concurrent.TimeUnit;
/** /**
* An {@link EventLoopGroup} that creates one {@link EventLoop} per {@link Channel}. * An {@link EventLoopGroup} that creates one {@link EventLoop} per {@link Channel}.
*
* @deprecated this will be remove in the next-major release.
*/ */
@Deprecated
public class ThreadPerChannelEventLoopGroup extends AbstractEventExecutorGroup implements EventLoopGroup { public class ThreadPerChannelEventLoopGroup extends AbstractEventExecutorGroup implements EventLoopGroup {
private final Object[] childArgs; private final Object[] childArgs;

View File

@ -34,6 +34,8 @@ import java.io.IOException;
/** /**
* Abstract base class for OIO which reads and writes bytes from/to a Socket * Abstract base class for OIO which reads and writes bytes from/to a Socket
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
public abstract class AbstractOioByteChannel extends AbstractOioChannel { public abstract class AbstractOioByteChannel extends AbstractOioChannel {

View File

@ -25,7 +25,10 @@ import java.net.SocketAddress;
/** /**
* Abstract base class for {@link Channel} implementations that use Old-Blocking-IO * Abstract base class for {@link Channel} implementations that use Old-Blocking-IO
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public abstract class AbstractOioChannel extends AbstractChannel { public abstract class AbstractOioChannel extends AbstractChannel {
protected static final int SO_TIMEOUT = 1000; protected static final int SO_TIMEOUT = 1000;

View File

@ -26,7 +26,10 @@ import java.util.List;
/** /**
* Abstract base class for OIO which reads and writes objects from/to a Socket * Abstract base class for OIO which reads and writes objects from/to a Socket
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public abstract class AbstractOioMessageChannel extends AbstractOioChannel { public abstract class AbstractOioMessageChannel extends AbstractOioChannel {
private final List<Object> readBuf = new ArrayList<Object>(); private final List<Object> readBuf = new ArrayList<Object>();

View File

@ -31,7 +31,10 @@ import java.nio.channels.WritableByteChannel;
/** /**
* Abstract base class for OIO Channels that are based on streams. * Abstract base class for OIO Channels that are based on streams.
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public abstract class OioByteStreamChannel extends AbstractOioByteChannel { public abstract class OioByteStreamChannel extends AbstractOioByteChannel {
private static final InputStream CLOSED_IN = new InputStream() { private static final InputStream CLOSED_IN = new InputStream() {

View File

@ -30,7 +30,10 @@ import java.util.concurrent.ThreadFactory;
/** /**
* {@link EventLoopGroup} which is used to handle OIO {@link Channel}'s. Each {@link Channel} will be handled by its * {@link EventLoopGroup} which is used to handle OIO {@link Channel}'s. Each {@link Channel} will be handled by its
* own {@link EventLoop} to not block others. * own {@link EventLoop} to not block others.
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public class OioEventLoopGroup extends ThreadPerChannelEventLoopGroup { public class OioEventLoopGroup extends ThreadPerChannelEventLoopGroup {
/** /**

View File

@ -17,5 +17,8 @@
/** /**
* Old blocking I/O based channel API implementation - recommended for * Old blocking I/O based channel API implementation - recommended for
* a small number of connections (&lt; 1000). * a small number of connections (&lt; 1000).
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
package io.netty.channel.oio; package io.netty.channel.oio;

View File

@ -33,7 +33,10 @@ import static io.netty.channel.ChannelOption.*;
/** /**
* Default {@link OioServerSocketChannelConfig} implementation * Default {@link OioServerSocketChannelConfig} implementation
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public class DefaultOioServerSocketChannelConfig extends DefaultServerSocketChannelConfig implements public class DefaultOioServerSocketChannelConfig extends DefaultServerSocketChannelConfig implements
OioServerSocketChannelConfig { OioServerSocketChannelConfig {

View File

@ -33,7 +33,10 @@ import static io.netty.channel.ChannelOption.*;
/** /**
* Default {@link OioSocketChannelConfig} implementation * Default {@link OioSocketChannelConfig} implementation
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public class DefaultOioSocketChannelConfig extends DefaultSocketChannelConfig implements OioSocketChannelConfig { public class DefaultOioSocketChannelConfig extends DefaultSocketChannelConfig implements OioSocketChannelConfig {
@Deprecated @Deprecated
public DefaultOioSocketChannelConfig(SocketChannel channel, Socket javaSocket) { public DefaultOioSocketChannelConfig(SocketChannel channel, Socket javaSocket) {

View File

@ -54,7 +54,9 @@ import java.util.Locale;
* *
* @see AddressedEnvelope * @see AddressedEnvelope
* @see DatagramPacket * @see DatagramPacket
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public class OioDatagramChannel extends AbstractOioMessageChannel public class OioDatagramChannel extends AbstractOioMessageChannel
implements DatagramChannel { implements DatagramChannel {

View File

@ -24,6 +24,10 @@ import io.netty.channel.socket.DatagramChannelConfig;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.NetworkInterface; import java.net.NetworkInterface;
/**
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public interface OioDatagramChannelConfig extends DatagramChannelConfig { public interface OioDatagramChannelConfig extends DatagramChannelConfig {
/** /**
* Sets the maximal time a operation on the underlying socket may block. * Sets the maximal time a operation on the underlying socket may block.

View File

@ -38,7 +38,10 @@ import java.util.concurrent.locks.ReentrantLock;
* {@link ServerSocketChannel} which accepts new connections and create the {@link OioSocketChannel}'s for them. * {@link ServerSocketChannel} which accepts new connections and create the {@link OioSocketChannel}'s for them.
* *
* This implementation use Old-Blocking-IO. * This implementation use Old-Blocking-IO.
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public class OioServerSocketChannel extends AbstractOioMessageChannel public class OioServerSocketChannel extends AbstractOioMessageChannel
implements ServerSocketChannel { implements ServerSocketChannel {

View File

@ -39,7 +39,10 @@ import io.netty.channel.socket.ServerSocketChannelConfig;
* <td>{@link ChannelOption#SO_TIMEOUT}</td><td>{@link #setSoTimeout(int)}</td> * <td>{@link ChannelOption#SO_TIMEOUT}</td><td>{@link #setSoTimeout(int)}</td>
* </tr> * </tr>
* </table> * </table>
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public interface OioServerSocketChannelConfig extends ServerSocketChannelConfig { public interface OioServerSocketChannelConfig extends ServerSocketChannelConfig {
/** /**

View File

@ -39,7 +39,10 @@ import java.net.SocketTimeoutException;
/** /**
* A {@link SocketChannel} which is using Old-Blocking-IO * A {@link SocketChannel} which is using Old-Blocking-IO
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public class OioSocketChannel extends OioByteStreamChannel implements SocketChannel { public class OioSocketChannel extends OioByteStreamChannel implements SocketChannel {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(OioSocketChannel.class); private static final InternalLogger logger = InternalLoggerFactory.getInstance(OioSocketChannel.class);

View File

@ -39,7 +39,10 @@ import io.netty.channel.socket.SocketChannelConfig;
* <td>{@link ChannelOption#SO_TIMEOUT}</td><td>{@link #setSoTimeout(int)}</td> * <td>{@link ChannelOption#SO_TIMEOUT}</td><td>{@link #setSoTimeout(int)}</td>
* </tr> * </tr>
* </table> * </table>
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
public interface OioSocketChannelConfig extends SocketChannelConfig { public interface OioSocketChannelConfig extends SocketChannelConfig {
/** /**

View File

@ -17,5 +17,8 @@
/** /**
* Old blocking I/O based socket channel API implementation - recommended for * Old blocking I/O based socket channel API implementation - recommended for
* a small number of connections (&lt; 1000). * a small number of connections (&lt; 1000).
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/ */
@Deprecated
package io.netty.channel.socket.oio; package io.netty.channel.socket.oio;