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

## Class LocalModelDescriptorStorage

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

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

      public class LocalModelDescriptorStorage
      extends Object
      implements ModelDescriptorStorage

  Model descriptor storage based on local hash map.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalModelDescriptorStorage()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ModelDescriptor` | `get(String name)` 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 name, 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 name)` 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

    - #### LocalModelDescriptorStorage

          public LocalModelDescriptorStorage()

  - ### Method Detail

    - #### put

          public void put(String name,
                          ModelDescriptor mdl)

      Saves the specified model descriptor with the specified model identifier.
      Specified by:
        `put` in interface `ModelDescriptorStorage`
      Parameters:
        `name` - 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 name)

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

    - #### remove

          public void remove(String name)

      Removes model descriptor for the specified model descriptor.
      Specified by:
        `remove` in interface `ModelDescriptorStorage`
      Parameters:
        `name` - 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.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022