This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch driver-35 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit c7c5ef161775daf2ac593bc9941327636dea5bf9 Author: stephen <[email protected]> AuthorDate: Fri Dec 6 14:53:07 2019 -0500 Removed some dead code. Was deprecated when we were targetting 3.4.x but now we can just take the break on 3.5.0. --- CHANGELOG.asciidoc | 3 +- docs/src/upgrade/release-3.5.x.asciidoc | 5 ++ .../tinkerpop/gremlin/driver/Channelizer.java | 80 +--------------------- 3 files changed, 8 insertions(+), 80 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 15d5db4..8a1c5aa 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -31,8 +31,7 @@ This release also includes changes from <<release-3-4-3, 3.4.3>>. * Added a `Graph.Feature` for `supportsNullPropertyValues`. * Refactored `MapStep` to move its logic to `ScalarMapStep` so that the old behavior could be preserved while allow other implementations to have more flexibility. * Modified TinkerGraph to support `null` property values and can be configured to disable that feature. -* Refactored the Java driver to use one connection per request. -* Refactored functionality of `WebSocketIdleEventHandler` into the `WebSocketClientHandler`. +* Refactored the Java driver to use one connection per request with many internal API changes. * Modified `null` handling in mutations to be consistent for a new `Vertex` as well as update to an existing one. * Removed support for Python 2.x in gremlinpython. * Upgraded to Apache Commons Configuration2. diff --git a/docs/src/upgrade/release-3.5.x.asciidoc b/docs/src/upgrade/release-3.5.x.asciidoc index 548ed95..9a11965 100644 --- a/docs/src/upgrade/release-3.5.x.asciidoc +++ b/docs/src/upgrade/release-3.5.x.asciidoc @@ -272,6 +272,11 @@ The following deprecated classes, methods or fields have been removed in this ve Certain elements of the API were not or could not be deprecated in prior versions and were simply renamed or removed for this release: +* `org.apache.tinkerpop.gremlin.driver.Channelizer#init(Connection)` +* `org.apache.tinkerpop.gremlin.driver.Channelizer#close()` +* `org.apache.tinkerpop.gremlin.driver.Channelizer#connected()` +* `org.apache.tinkerpop.gremlin.driver.Channelizer#createKeepAliveMessage()` +* `org.apache.tinkerpop.gremlin.driver.Channelizer#supportsKeepAlive()` * `org.apache.tinkerpop.gremlin.driver.handler.WebSocketIdleEventHandler` * `org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode#SERVER_ERROR_SCRIPT_EVALUATION` became `SERVER_ERROR_EVALUATION` diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java index 4b4d426..5d20ab1 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java @@ -54,55 +54,13 @@ import static java.lang.Math.toIntExact; */ public interface Channelizer extends ChannelHandler { - /** - * Initializes the {@code Channelizer}. Called just after construction. - * @param connection - * - * @deprecated As of release 3.4.3, replaced by {@link #init(ConnectionPool)}. - */ - @Deprecated - public void init(final Connection connection); - public default void init(final ConnectionPool connectionPool) { throw new UnsupportedOperationException(); } - /** - * Called on {@link Connection#close()} to perform an {@code Channelizer} specific functions. Note that the - * {@link Connection} already calls {@code Channel.close()} so there is no need to call that method here. - * An implementation will typically use this method to send a {@code Channelizer} specific message to the - * server to notify of shutdown coming from the client side (e.g. a "close" websocket frame). - */ - public void close(final Channel channel); - - /** - * Create a message for the driver to use as a "keep-alive" for the connectionPool. This method will only be used if - * {@link #supportsKeepAlive()} is {@code true}. - */ - public default Object createKeepAliveMessage() { - return null; - } - - /** - * Determines if the channelizer supports a method for keeping the connectionPool to the server alive. - */ - public default boolean supportsKeepAlive() { - return false; - } - - /** - * Called after the channel connects. The {@code Channelizer} may need to perform some functions, such as a - * handshake. - * - * @deprecated As of release 3.4.3, replaced by {@link #connected(Channel)}. - */ - @Deprecated - public default void connected() { - } - public default void connected(final Channel ch) { } /** - * Base implementation of the client side {@link Channelizer}. + * Base implementation of the client side {@code Channelizer}. */ abstract class AbstractChannelizer extends ChannelInitializer<SocketChannel> implements Channelizer { protected ConnectionPool connectionPool; @@ -118,20 +76,6 @@ public interface Channelizer extends ChannelHandler { public abstract void configure(final ChannelPipeline pipeline); - public void finalize(final ChannelPipeline pipeline) { - // do nothing - } - - @Override - public void close(final Channel channel) { - // do nothing - } - - @Override - public void init(final Connection connection) { - // do nothing - } - @Override public void init(final ConnectionPool connPool) { this.connectionPool = connPool; @@ -174,27 +118,12 @@ public interface Channelizer extends ChannelHandler { private WebSocketGremlinResponseDecoder webSocketGremlinResponseDecoder; @Override - public void init(Connection connection) { - throw new UnsupportedOperationException(); - } - - @Override public void init(final ConnectionPool connpool) { super.init(connpool); webSocketGremlinRequestEncoder = new WebSocketGremlinRequestEncoder(true, cluster.getSerializer()); webSocketGremlinResponseDecoder = new WebSocketGremlinResponseDecoder(cluster.getSerializer()); } - /** - * Keep-alive is supported through the ping/pong websocket protocol. - * - * @see <a href=https://tools.ietf.org/html/rfc6455#section-5.5.2>IETF RFC 6455</a> - */ - @Override - public boolean supportsKeepAlive() { - return true; - } - @Override public boolean supportsSsl() { final String scheme = connectionPool.getHost().getHostUri().getScheme(); @@ -255,12 +184,7 @@ public interface Channelizer extends ChannelHandler { */ public final class NioChannelizer extends AbstractChannelizer { @Override - public void init(final Connection connection) { - super.init(connection); - } - - @Override - public void configure(ChannelPipeline pipeline) { + public void configure(final ChannelPipeline pipeline) { pipeline.addLast("gremlin-decoder", new NioGremlinResponseDecoder(cluster.getSerializer())); pipeline.addLast("gremlin-encoder", new NioGremlinRequestEncoder(true, cluster.getSerializer())); }
