test_class.declarator: cfg
test_class.modifier: private final
test_class.original_string: private final IgniteConfiguration cfg;
test_class.type: IgniteConfiguration
test_class.var_name: cfg
test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/inference/IgniteModelStorageUtilTest.java
test_class.identifier: IgniteModelStorageUtilTest
test_class.superclass: extends GridCommonAbstractTest
test_case.body: @Test(expected = IllegalArgumentException.class)
      public void testSaveModelWithTheSameName() throws Exception {
          try (Ignite ignite = startGrid(cfg)) {
              IgniteModelStorageUtil.saveModel(ignite, i -> 0.42, "mdl");
              IgniteModelStorageUtil.saveModel(ignite, i -> 0.42, "mdl");
          }
      }
test_case.class_method_signature: IgniteModelStorageUtilTest.testSaveModelWithTheSameName()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void testSaveModelWithTheSameName()
test_case.identifier: testSaveModelWithTheSameName
test_case.invocations: startGrid saveModel saveModel
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSaveModelWithTheSameName()
focal_class.declarator: IGNITE_MDL_FOLDER = "/ignite_models"
focal_class.modifier: private static final
focal_class.original_string: private static final String IGNITE_MDL_FOLDER = "/ignite_models";
focal_class.type: String
focal_class.var_name: IGNITE_MDL_FOLDER
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/inference/IgniteModelStorageUtil.java
focal_class.identifier: IgniteModelStorageUtil
focal_class.class_method_signature: IgniteModelStorageUtil.saveModel(Ignite ignite,
          IgniteModel<I, O> mdl, String name)
focal_class.full_signature: public static void saveModel(Ignite ignite,
          IgniteModel<I, O> mdl, String name)
focal_class.identifier: saveModel
focal_class.modifiers: public static
focal_class.parameters: (Ignite ignite,
          IgniteModel<I, O> mdl, String name)
focal_class.return: void
focal_class.signature: void saveModel(Ignite ignite,
          IgniteModel<I, O> mdl, String name)
focal_class.class_method_signature: IgniteModelStorageUtil.removeModel(Ignite ignite, String name)
focal_class.full_signature: public static void removeModel(Ignite ignite, String name)
focal_class.identifier: removeModel
focal_class.modifiers: public static
focal_class.parameters: (Ignite ignite, String name)
focal_class.return: void
focal_class.signature: void removeModel(Ignite ignite, String name)
focal_class.class_method_signature: IgniteModelStorageUtil.getModel(Ignite ignite, String name)
focal_class.full_signature: public static Model<I, O> getModel(Ignite ignite, String name)
focal_class.identifier: getModel
focal_class.modifiers: public static
focal_class.parameters: (Ignite ignite, String name)
focal_class.return: Model<I, O>
focal_class.signature: Model<I, O> getModel(Ignite ignite, String name)
focal_class.class_method_signature: IgniteModelStorageUtil.getSyncModel(Ignite ignite, String name,
          SyncModelBuilder mdlBldr)
focal_class.full_signature: public static Model<I, O> getSyncModel(Ignite ignite, String name,
          SyncModelBuilder mdlBldr)
focal_class.identifier: getSyncModel
focal_class.modifiers: public static
focal_class.parameters: (Ignite ignite, String name,
          SyncModelBuilder mdlBldr)
focal_class.return: Model<I, O>
focal_class.signature: Model<I, O> getSyncModel(Ignite ignite, String name,
          SyncModelBuilder mdlBldr)
focal_class.class_method_signature: IgniteModelStorageUtil.getAsyncModel(Ignite ignite, String name, AsyncModelBuilder mdlBldr)
focal_class.full_signature: public static Model<Vector, Future<Double>> getAsyncModel(Ignite ignite, String name, AsyncModelBuilder mdlBldr)
focal_class.identifier: getAsyncModel
focal_class.modifiers: public static
focal_class.parameters: (Ignite ignite, String name, AsyncModelBuilder mdlBldr)
focal_class.return: Model<Vector, Future<Double>>
focal_class.signature: Model<Vector, Future<Double>> getAsyncModel(Ignite ignite, String name, AsyncModelBuilder mdlBldr)
focal_class.class_method_signature: IgniteModelStorageUtil.saveModelEntity(Ignite ignite, byte[] serializedMdl, UUID mdlId)
focal_class.full_signature: private static void saveModelEntity(Ignite ignite, byte[] serializedMdl, UUID mdlId)
focal_class.identifier: saveModelEntity
focal_class.modifiers: private static
focal_class.parameters: (Ignite ignite, byte[] serializedMdl, UUID mdlId)
focal_class.return: void
focal_class.signature: void saveModelEntity(Ignite ignite, byte[] serializedMdl, UUID mdlId)
focal_class.class_method_signature: IgniteModelStorageUtil.removeModelEntity(Ignite ignite, UUID mdlId)
focal_class.full_signature: private static void removeModelEntity(Ignite ignite, UUID mdlId)
focal_class.identifier: removeModelEntity
focal_class.modifiers: private static
focal_class.parameters: (Ignite ignite, UUID mdlId)
focal_class.return: void
focal_class.signature: void removeModelEntity(Ignite ignite, UUID mdlId)
focal_class.class_method_signature: IgniteModelStorageUtil.saveModelDescriptor(Ignite ignite, String name, UUID mdlId)
focal_class.full_signature: private static void saveModelDescriptor(Ignite ignite, String name, UUID mdlId)
focal_class.identifier: saveModelDescriptor
focal_class.modifiers: private static
focal_class.parameters: (Ignite ignite, String name, UUID mdlId)
focal_class.return: void
focal_class.signature: void saveModelDescriptor(Ignite ignite, String name, UUID mdlId)
focal_class.class_method_signature: IgniteModelStorageUtil.removeModelDescriptor(Ignite ignite, String name)
focal_class.full_signature: private static void removeModelDescriptor(Ignite ignite, String name)
focal_class.identifier: removeModelDescriptor
focal_class.modifiers: private static
focal_class.parameters: (Ignite ignite, String name)
focal_class.return: void
focal_class.signature: void removeModelDescriptor(Ignite ignite, String name)
focal_class.class_method_signature: IgniteModelStorageUtil.getModelDescriptor(Ignite ignite, String name)
focal_class.full_signature: private static ModelDescriptor getModelDescriptor(Ignite ignite, String name)
focal_class.identifier: getModelDescriptor
focal_class.modifiers: private static
focal_class.parameters: (Ignite ignite, String name)
focal_class.return: ModelDescriptor
focal_class.signature: ModelDescriptor getModelDescriptor(Ignite ignite, String name)
focal_class.class_method_signature: IgniteModelStorageUtil.wrapIgniteModel(
          IgniteModel<I, O> mdl)
focal_class.full_signature: private static IgniteModel<byte[], byte[]> wrapIgniteModel(
          IgniteModel<I, O> mdl)
focal_class.identifier: wrapIgniteModel
focal_class.modifiers: private static
focal_class.parameters: (
          IgniteModel<I, O> mdl)
focal_class.return: IgniteModel<byte[], byte[]>
focal_class.signature: IgniteModel<byte[], byte[]> wrapIgniteModel(
          IgniteModel<I, O> mdl)
focal_class.class_method_signature: IgniteModelStorageUtil.unwrapIgniteSyncModel(
          Model<byte[], byte[]> mdl)
focal_class.full_signature: private static Model<I, O> unwrapIgniteSyncModel(
          Model<byte[], byte[]> mdl)
focal_class.identifier: unwrapIgniteSyncModel
focal_class.modifiers: private static
focal_class.parameters: (
          Model<byte[], byte[]> mdl)
focal_class.return: Model<I, O>
focal_class.signature: Model<I, O> unwrapIgniteSyncModel(
          Model<byte[], byte[]> mdl)
focal_class.class_method_signature: IgniteModelStorageUtil.unwrapIgniteAsyncModel(Model<byte[], Future<byte[]>> mdl)
focal_class.full_signature: private static Model<Vector, Future<Double>> unwrapIgniteAsyncModel(Model<byte[], Future<byte[]>> mdl)
focal_class.identifier: unwrapIgniteAsyncModel
focal_class.modifiers: private static
focal_class.parameters: (Model<byte[], Future<byte[]>> mdl)
focal_class.return: Model<Vector, Future<Double>>
focal_class.signature: Model<Vector, Future<Double>> unwrapIgniteAsyncModel(Model<byte[], Future<byte[]>> mdl)
focal_method.body: public static <I extends Serializable, O extends Serializable> void saveModel(Ignite ignite,
          IgniteModel<I, O> mdl, String name) {
          IgniteModel<byte[], byte[]> mdlWrapper = wrapIgniteModel(mdl);
          byte[] serializedMdl = Utils.serialize(mdlWrapper);
          UUID mdlId = UUID.randomUUID();
  
          saveModelDescriptor(ignite, name, mdlId);
  
          try {
              saveModelEntity(ignite, serializedMdl, mdlId);
          }
          catch (Exception e) {
              // Here we need to do a rollback and remove descriptor from correspondent storage.
              removeModelEntity(ignite, mdlId);
              throw e;
          }
      }
focal_method.class_method_signature: IgniteModelStorageUtil.saveModel(Ignite ignite,
          IgniteModel<I, O> mdl, String name)
focal_method.full_signature: public static void saveModel(Ignite ignite,
          IgniteModel<I, O> mdl, String name)
focal_method.identifier: saveModel
focal_method.invocations: wrapIgniteModel serialize randomUUID saveModelDescriptor saveModelEntity removeModelEntity
focal_method.modifiers: public static
focal_method.parameters: (Ignite ignite,
          IgniteModel<I, O> mdl, String name)
focal_method.return: void
focal_method.signature: void saveModel(Ignite ignite,
          IgniteModel<I, O> mdl, String name)