org.apache.ignite.ml.inference.storage.descriptor

## Class IgniteModelDescriptorStorage

- java.lang.Object
- - org.apache.ignite.ml.inference.storage.descriptor.IgniteModelDescriptorStorage

- All Implemented Interfaces:
    Iterable<IgniteBiTuple<String,ModelDescriptor>>, ModelDescriptorStorage

      public class IgniteModelDescriptorStorage
      extends Object
      implements ModelDescriptorStorage

  Model descriptor storage based on Apache Ignite cache.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IgniteModelDescriptorStorage(IgniteCache<String,ModelDescriptor> models)` Constructs a new instance of Ignite model descriptor storage.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ModelDescriptor` | `get(String mdlId)` Returns model descriptor saved for the specified model identifier.
    `Iterator<IgniteBiTuple<String,ModelDescriptor>>` | `iterator()` Returns iterator of model descriptors stored in this model descriptor storage.
    `void` | `put(String mdlId, ModelDescriptor mdl)` Saves the specified model descriptor with the specified model identifier.
    `boolean` | `putIfAbsent(String mdlId, ModelDescriptor mdl)` Saves the specified model descriptor with the specified model identifier if it's not saved yet.
    `void` | `remove(String mdlId)` Removes model descriptor for the specified model descriptor.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### IgniteModelDescriptorStorage

          public IgniteModelDescriptorStorage(IgniteCache<String,ModelDescriptor> models)

      Constructs a new instance of Ignite model descriptor storage.
      Parameters:
        `models` - Ignite cache with model descriptors.

  - ### Method Detail

    - #### put

          public void put(String mdlId,
                          ModelDescriptor mdl)

      Saves the specified model descriptor with the specified model identifier.
      Specified by:
        `put` in interface `ModelDescriptorStorage`
      Parameters:
        `mdlId` - Model identifier.
        `mdl` - Model descriptor.

    - #### putIfAbsent

          public boolean putIfAbsent(String mdlId,
                                     ModelDescriptor mdl)

      Saves the specified model descriptor with the specified model identifier if it's not saved yet.
      Specified by:
        `putIfAbsent` in interface `ModelDescriptorStorage`
      Parameters:
        `mdlId` - Model identifier.
        `mdl` - Model descriptor.
      Returns:
        `true` if model descriptor has been successfully saved, otherwise `false`.

    - #### get

          public ModelDescriptor get(String mdlId)

      Returns model descriptor saved for the specified model identifier.
      Specified by:
        `get` in interface `ModelDescriptorStorage`
      Parameters:
        `mdlId` - Model identifier.
      Returns:
        Model descriptor.

    - #### remove

          public void remove(String mdlId)

      Removes model descriptor for the specified model descriptor.
      Specified by:
        `remove` in interface `ModelDescriptorStorage`
      Parameters:
        `mdlId` - Model identifier.

    - #### iterator

          public Iterator<IgniteBiTuple<String,ModelDescriptor>> iterator()

      Returns iterator of model descriptors stored in this model descriptor storage. The objects produces by the iterator are pairs of model identifier and model descriptor.
      Specified by:
        `iterator` in interface `Iterable<IgniteBiTuple<String,ModelDescriptor>>`
      Specified by:
        `iterator` in interface `ModelDescriptorStorage`
      Returns:
        Iterator of pairs of model identifier and model descriptor.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020