You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2020/01/02 19:47:18 UTC

[tinkerpop] 14/22: Removed some dead code.

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 a35abab96ecd63fb1bc5a067c7791deb08be5f89
Author: stephen <sp...@gmail.com>
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      | 73 +---------------------
 3 files changed, 7 insertions(+), 74 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6b03002..0c3652b 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 4fd9a86..69ad810 100644
--- a/docs/src/upgrade/release-3.5.x.asciidoc
+++ b/docs/src/upgrade/release-3.5.x.asciidoc
@@ -278,6 +278,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 bcb6139..ee18890 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
@@ -52,55 +52,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;
@@ -116,20 +74,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;
@@ -172,27 +116,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();