static SimpleSerializer getInstance()

in modules/core/src/main/java/org/apache/fluo/recipes/core/serialization/SimpleSerializer.java [45:56]


  static SimpleSerializer getInstance(SimpleConfiguration appConfig) {
    String serType = appConfig.getString("recipes.serializer",
        "org.apache.fluo.recipes.kryo.KryoSimplerSerializer");
    try {
      SimpleSerializer simplerSer = SimpleSerializer.class.getClassLoader().loadClass(serType)
          .asSubclass(SimpleSerializer.class).newInstance();
      simplerSer.init(appConfig);
      return simplerSer;
    } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }