org.apache.ignite.marshaller

## Interface MarshallerContext

-     public interface MarshallerContext

  Marshaller context.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `IgnitePredicate<String>` | `classNameFilter()` Returns class name filter.
    `Class` | `getClass(int typeId, ClassLoader ldr)` Gets class for provided type ID.
    `String` | `getClassName(byte platformId, int typeId)` Gets class name for provided (platformId, typeId) pair.
    `boolean` | `isSystemType(String typeName)` Checks whether the given type is a system one - JDK class or Ignite class.
    `JdkMarshaller` | `jdkMarshaller()`
    `boolean` | `registerClassName(byte platformId, int typeId, String clsName)` Deprecated. Use `registerClassName(byte, int, java.lang.String, boolean)` instead. This particular method will be deleted in future releases.
    `default boolean` | `registerClassName(byte platformId, int typeId, String clsName, boolean failIfUnregistered)` Method to register typeId->class name mapping in marshaller context cluster-wide.
    `boolean` | `registerClassNameLocally(byte platformId, int typeId, String clsName)` Method to register typeId->class name mapping in marshaller context on local node only.

- - ### Method Detail

    - #### registerClassName

          default boolean registerClassName(byte platformId,
                                            int typeId,
                                            String clsName,
                                            boolean failIfUnregistered)
                                     throws IgniteCheckedException

      Method to register typeId->class name mapping in marshaller context cluster-wide. This method guarantees that mapping is delivered to all nodes in cluster and blocks caller thread until then.
      Parameters:
        `platformId` - Id of a platform (java, .NET, etc.) to register mapping for.
        `typeId` - Type ID.
        `clsName` - Class name.
        `failIfUnregistered` - If `true` then throw `UnregisteredBinaryTypeException` with registration future instead of synchronously awaiting for its completion.
      Returns:
        `True` if mapping was registered successfully.
      Throws:
        `IgniteCheckedException` - In case of error.

    - #### registerClassName

          @Deprecated
          boolean registerClassName(byte platformId,
                                                int typeId,
                                                String clsName)
                                         throws IgniteCheckedException

      Deprecated. Use `registerClassName(byte, int, java.lang.String, boolean)` instead. This particular method will be deleted in future releases.
      Same as `registerClassName(byte, int, java.lang.String, boolean)` but with shortened parameters list.
      Parameters:
        `platformId` - ID of a platform (java, .NET, etc.) to register mapping for.
        `typeId` - Type ID.
        `clsName` - Class name.
      Returns:
        `True` if mapping was registered successfully.
      Throws:
        `IgniteCheckedException`

    - #### registerClassNameLocally

          boolean registerClassNameLocally(byte platformId,
                                           int typeId,
                                           String clsName)
                                    throws IgniteCheckedException

      Method to register typeId->class name mapping in marshaller context on local node only. No guarantees that the mapping is presented on other nodes are provided. This method is safe to use if there is another source of mappings like metadata persisted on disk and this source is known to be solid and free of conflicts beforehand.
      Parameters:
        `platformId` - Id of a platform (java, .NET, etc.) to register mapping for.
        `typeId` - Type id.
        `clsName` - Class name.
      Returns:
        `True` if class mapping was registered successfully.
      Throws:
        `IgniteCheckedException` - In case of error.

    - #### getClass

          Class getClass(int typeId,
                         ClassLoader ldr)
                  throws ClassNotFoundException,
                         IgniteCheckedException

      Gets class for provided type ID.
      Parameters:
        `typeId` - Type ID.
        `ldr` - Class loader.
      Returns:
        Class.
      Throws:
        `ClassNotFoundException` - If class was not found.
        `IgniteCheckedException` - In case of any other error.

    - #### getClassName

          String getClassName(byte platformId,
                              int typeId)
                       throws ClassNotFoundException,
                              IgniteCheckedException

      Gets class name for provided (platformId, typeId) pair.
      Parameters:
        `platformId` - id of a platform the class was registered for.
        `typeId` - Type ID.
      Returns:
        Class name
      Throws:
        `ClassNotFoundException` - If class was not found.
        `IgniteCheckedException` - In case of any other error.

    - #### isSystemType

          boolean isSystemType(String typeName)

      Checks whether the given type is a system one - JDK class or Ignite class.
      Parameters:
        `typeName` - Type name.
      Returns:
        `true` if the type is a system one, `false` otherwise.

    - #### classNameFilter

          IgnitePredicate<String> classNameFilter()

      Returns class name filter.
      Returns:
        Class name filter.

    - #### jdkMarshaller

          JdkMarshaller jdkMarshaller()

      Returns:
        JDK marshaller instance.

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023