@Test public void testSetDefaultSerializersWithGraphBinaryWithRegistry() throws Exception { Settings settings = JanusGraphSettingsUtils.configureDefaultSerializersIfNotSet( Settings.read("src/test/resources/janusgraph-server-without-serializers.yaml")); Optional<Settings.SerializerSettings> graphBinary = settings.serializers .stream() .filter(it -> it.className.equals("org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1") && it.config.get("ioRegistries") != null).findFirst(); assertTrue(graphBinary.isPresent()); assertTrue(((List)graphBinary.get().config.get("ioRegistries")).contains("org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry")); }
public static Settings configureDefaultSerializersIfNotSet(Settings settings) { if(settings.serializers.size() != 0) return settings; List<Settings.SerializerSettings> serializers = new ArrayList<>(); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0" ); settings.serializers = serializers; return settings; }
JanusGraphSettingsUtils { public static Settings configureDefaultSerializersIfNotSet(Settings settings) { if(settings.serializers.size() != 0) return settings; List<Settings.SerializerSettings> serializers = new ArrayList<>(); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0" ); settings.serializers = serializers; return settings; } }
JanusGraphSettingsUtils { public static Settings configureDefaultSerializersIfNotSet(Settings settings) { if(settings.serializers.size() != 0) return settings; List<Settings.SerializerSettings> serializers = new ArrayList<>(); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0" ); settings.serializers = serializers; return settings; }  }
JanusGraphSettingsUtils { public static Settings configureDefaultSerializersIfNotSet(Settings settings) { if(settings.serializers.size() != 0) return settings; List<Settings.SerializerSettings> serializers = new ArrayList<>(); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0" ); settings.serializers = serializers; return settings; }  static Settings configureDefaultSerializersIfNotSet(Settings settings); }
JanusGraphSettingsUtils { public static Settings configureDefaultSerializersIfNotSet(Settings settings) { if(settings.serializers.size() != 0) return settings; List<Settings.SerializerSettings> serializers = new ArrayList<>(); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithResultToString( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0" ); addSerializerWithRegistry( serializers, "org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0" ); settings.serializers = serializers; return settings; }  static Settings configureDefaultSerializersIfNotSet(Settings settings);  }