gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2.java [342:415]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        @Override
        public boolean isCachable() {
            return true;
        }
    }

    static class TraverserJacksonDeserializer extends StdDeserializer<Traverser> {

        public TraverserJacksonDeserializer() {
            super(Traverser.class);
        }

        @Override
        public Traverser deserialize(final JsonParser jsonParser, final DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
            long bulk = 1;
            Object v = null;

            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                if (jsonParser.getCurrentName().equals(GraphSONTokens.BULK)) {
                    jsonParser.nextToken();
                    bulk = deserializationContext.readValue(jsonParser, Long.class);
                } else if (jsonParser.getCurrentName().equals(GraphSONTokens.VALUE)) {
                    jsonParser.nextToken();
                    v = deserializationContext.readValue(jsonParser, Object.class);
                }
            }

            return new DefaultRemoteTraverser<>(v, bulk);
        }

        @Override
        public boolean isCachable() {
            return true;
        }
    }

    final static class TraversalStrategyProxyJacksonDeserializer<T extends TraversalStrategy> extends AbstractObjectDeserializer<TraversalStrategyProxy> {

        private Class<T> clazz;

        public TraversalStrategyProxyJacksonDeserializer() {
            super(TraversalStrategyProxy.class);
            this.clazz = null;
        }

        public TraversalStrategyProxyJacksonDeserializer(final Class<T> clazz) {
            super(TraversalStrategyProxy.class);
            this.clazz = clazz;
        }

        @Override
        public TraversalStrategyProxy<T> createObject(final Map<String, Object> data) {
            final BaseConfiguration config = new BaseConfiguration();

            // if the clazz is a TraversalStrategyProxy, that means it was loaded from reference as one, rather than
            // an explicit strategy instance like one defined as "g:HaltedTraverserStrategy". in this case, we would
            // want to get the class right. we don't update clazz or else it gets cached in the type resolver
            final Class clasz;
            final Map<String,Object> mapConf = (Map<String,Object>) data.get("conf");
            if (null == this.clazz || this.clazz == TraversalStrategyProxy.class) {
                try {
                    clasz = Class.forName(data.get("fqcn").toString());
                } catch (Exception ex) {
                    throw new IllegalArgumentException("Could not load class " + mapConf.get("fqcn").toString(), ex);
                }
            } else {
                clasz = this.clazz;
            }

            config.setListDelimiterHandler(GremlinDisabledListDelimiterHandler.instance());
            for (Map.Entry<String, Object> entry : mapConf.entrySet()) {
                config.setProperty(entry.getKey(), entry.getValue());
            }
            return new TraversalStrategyProxy<>(clasz, config);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV3.java [431:504]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        @Override
        public boolean isCachable() {
            return true;
        }
    }

    static class TraverserJacksonDeserializer extends StdDeserializer<Traverser> {

        public TraverserJacksonDeserializer() {
            super(Traverser.class);
        }

        @Override
        public Traverser deserialize(final JsonParser jsonParser, final DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
            long bulk = 1;
            Object v = null;

            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                if (jsonParser.getCurrentName().equals(GraphSONTokens.BULK)) {
                    jsonParser.nextToken();
                    bulk = deserializationContext.readValue(jsonParser, Long.class);
                } else if (jsonParser.getCurrentName().equals(GraphSONTokens.VALUE)) {
                    jsonParser.nextToken();
                    v = deserializationContext.readValue(jsonParser, Object.class);
                }
            }

            return new DefaultRemoteTraverser<>(v, bulk);
        }

        @Override
        public boolean isCachable() {
            return true;
        }
    }

    final static class TraversalStrategyProxyJacksonDeserializer<T extends TraversalStrategy> extends AbstractObjectDeserializer<TraversalStrategyProxy> {

        private Class<T> clazz;

        public TraversalStrategyProxyJacksonDeserializer() {
            super(TraversalStrategyProxy.class);
            this.clazz = null;
        }

        public TraversalStrategyProxyJacksonDeserializer(final Class<T> clazz) {
            super(TraversalStrategyProxy.class);
            this.clazz = clazz;
        }

        @Override
        public TraversalStrategyProxy<T> createObject(final Map<String, Object> data) {
            final BaseConfiguration config = new BaseConfiguration();

            // if the clazz is a TraversalStrategyProxy, that means it was loaded from reference as one, rather than
            // an explicit strategy instance like one defined as "g:HaltedTraverserStrategy". in this case, we would
            // want to get the class right. we don't update clazz or else it gets cached in the type resolver
            final Class clasz;
            final Map<String,Object> mapConf = (Map<String,Object>) data.get("conf");
            if (null == this.clazz || this.clazz == TraversalStrategyProxy.class) {
                try {
                    clasz = Class.forName(data.get("fqcn").toString());
                } catch (Exception ex) {
                    throw new IllegalArgumentException("Could not load class " + mapConf.get("fqcn").toString(), ex);
                }
            } else {
                clasz = this.clazz;
            }

            config.setListDelimiterHandler(GremlinDisabledListDelimiterHandler.instance());
            for (Map.Entry<String, Object> entry : mapConf.entrySet()) {
                config.setProperty(entry.getKey(), entry.getValue());
            }
            return new TraversalStrategyProxy<>(clasz, config);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



