Skip to content

Commit

Permalink
Mark OIO based transports as deprecated as preparation for removal in…
Browse files Browse the repository at this point in the history
… Netty 5. (netty#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.
  • Loading branch information
normanmaurer authored Nov 21, 2018
1 parent d728a72 commit 31fd66b
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@
*
* 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+.
*
* @deprecated use {@link io.netty.channel.sctp.nio.NioSctpChannel}.
*/
@Deprecated
public class OioSctpChannel extends AbstractOioMessageChannel
implements io.netty.channel.sctp.SctpChannel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
*
* 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+.
*
* @deprecated use {@link io.netty.channel.sctp.nio.NioSctpServerChannel}.
*/
@Deprecated
public class OioSctpServerChannel extends AbstractOioMessageChannel
implements io.netty.channel.sctp.SctpServerChannel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
/**
* Old blocking I/O based SCTP channel API implementation - recommended for
* a small number of connections (< 1000).
*
* @deprecated use NIO based SCTP implementation.
*/
@Deprecated
package io.netty.channel.sctp.oio;
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
* {@link SingleThreadEventLoop} which is used to handle OIO {@link Channel}'s. So in general there will be
* one {@link ThreadPerChannelEventLoop} per {@link Channel}.
*
* @deprecated this will be remove in the next-major release.
*/
@Deprecated
public class ThreadPerChannelEventLoop extends SingleThreadEventLoop {

private final ThreadPerChannelEventLoopGroup parent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@

/**
* 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 {

private final Object[] childArgs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

/**
* 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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

/**
* 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 {

protected static final int SO_TIMEOUT = 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@

/**
* 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 {

private final List<Object> readBuf = new ArrayList<Object>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@

/**
* Abstract base class for OIO Channels that are based on streams.
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public abstract class OioByteStreamChannel extends AbstractOioByteChannel {

private static final InputStream CLOSED_IN = new InputStream() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
/**
* {@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.
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public class OioEventLoopGroup extends ThreadPerChannelEventLoopGroup {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
/**
* Old blocking I/O based channel API implementation - recommended for
* a small number of connections (&lt; 1000).
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
package io.netty.channel.oio;
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@

/**
* Default {@link OioServerSocketChannelConfig} implementation
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public class DefaultOioServerSocketChannelConfig extends DefaultServerSocketChannelConfig implements
OioServerSocketChannelConfig {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@

/**
* Default {@link OioSocketChannelConfig} implementation
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public class DefaultOioSocketChannelConfig extends DefaultSocketChannelConfig implements OioSocketChannelConfig {
@Deprecated
public DefaultOioSocketChannelConfig(SocketChannel channel, Socket javaSocket) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
*
* @see AddressedEnvelope
* @see DatagramPacket
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public class OioDatagramChannel extends AbstractOioMessageChannel
implements DatagramChannel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
import java.net.InetAddress;
import java.net.NetworkInterface;

/**
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public interface OioDatagramChannelConfig extends DatagramChannelConfig {
/**
* Sets the maximal time a operation on the underlying socket may block.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
* {@link ServerSocketChannel} which accepts new connections and create the {@link OioSocketChannel}'s for them.
*
* This implementation use Old-Blocking-IO.
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public class OioServerSocketChannel extends AbstractOioMessageChannel
implements ServerSocketChannel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
* <td>{@link ChannelOption#SO_TIMEOUT}</td><td>{@link #setSoTimeout(int)}</td>
* </tr>
* </table>
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public interface OioServerSocketChannelConfig extends ServerSocketChannelConfig {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@

/**
* A {@link SocketChannel} which is using Old-Blocking-IO
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public class OioSocketChannel extends OioByteStreamChannel implements SocketChannel {

private static final InternalLogger logger = InternalLoggerFactory.getInstance(OioSocketChannel.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
* <td>{@link ChannelOption#SO_TIMEOUT}</td><td>{@link #setSoTimeout(int)}</td>
* </tr>
* </table>
*
* @deprecated use NIO / EPOLL / KQUEUE transport.
*/
@Deprecated
public interface OioSocketChannelConfig extends SocketChannelConfig {

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

0 comments on commit 31fd66b

Please sign in to comment.