Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore public API changes for transport-netty-internal #1549

Merged
merged 1 commit into from
May 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
import io.netty.channel.Channel;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.ServerChannel;
import io.netty.channel.epoll.Epoll;
import io.netty.channel.epoll.EpollDatagramChannel;
import io.netty.channel.epoll.EpollDomainSocketChannel;
import io.netty.channel.epoll.EpollServerDomainSocketChannel;
import io.netty.channel.epoll.EpollServerSocketChannel;
import io.netty.channel.epoll.EpollSocketChannel;
import io.netty.channel.kqueue.KQueue;
import io.netty.channel.kqueue.KQueueDatagramChannel;
import io.netty.channel.kqueue.KQueueDomainSocketChannel;
import io.netty.channel.kqueue.KQueueServerDomainSocketChannel;
Expand All @@ -48,8 +50,6 @@
import javax.annotation.Nullable;

import static io.netty.util.NetUtil.createByteArrayFromIpAddressString;
import static io.servicetalk.transport.netty.internal.NativeTransportUtils.useEpoll;
import static io.servicetalk.transport.netty.internal.NativeTransportUtils.useKQueue;
import static java.net.InetAddress.getByAddress;

/**
Expand All @@ -60,6 +60,30 @@ private BuilderUtils() {
// Utility methods only
}

/**
* Returns {@code true} if native {@link Epoll} transport could be used.
*
* @deprecated Use {@link NativeTransportUtils#useEpoll(EventLoopGroup)}
* @param group the used {@link EventLoopGroup}
* @return {@code true} if native {@link Epoll} transport could be used
*/
@Deprecated
public static boolean useEpoll(EventLoopGroup group) {
return NativeTransportUtils.useEpoll(group);
}

/**
* Returns {@code true} if native {@link KQueue} transport could be used.
*
* @deprecated Use {@link NativeTransportUtils#useKQueue(EventLoopGroup)}
* @param group the used {@link EventLoopGroup}
* @return {@code true} if native {@link KQueue} transport could be used
*/
@Deprecated
public static boolean useKQueue(EventLoopGroup group) {
return NativeTransportUtils.useKQueue(group);
}

/**
* Returns the correct {@link Class} to use with the given {@link EventLoopGroup}.
*
Expand Down