org.apache.ignite.marshaller

## Class AbstractNodeNameAwareMarshaller

- java.lang.Object
- - org.apache.ignite.marshaller.AbstractMarshaller
  - - org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller

- All Implemented Interfaces:
    Marshaller
  Direct Known Subclasses:
    JdkMarshaller

      public abstract class AbstractNodeNameAwareMarshaller
      extends AbstractMarshaller

  Marshaller allowing for `Ignition.localIgnite()` calls.

- - ### Field Summary

    - ### Fields inherited from class org.apache.ignite.marshaller.AbstractMarshaller

      `ctx, DFLT_BUFFER_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractNodeNameAwareMarshaller()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `marshal(@Nullable Object obj)` Marshals object to byte array.
    `void` | `marshal(@Nullable Object obj, OutputStream out)` Marshals object to the output stream.
    `protected abstract byte[]` | `marshal0(@Nullable Object obj)` Marshals object to byte array.
    `protected abstract void` | `marshal0(@Nullable Object obj, OutputStream out)` Marshals object to the output stream.
    `void` | `nodeName(@Nullable String nodeName)` Set node name.
    `<T> T` | `unmarshal(byte[] arr, @Nullable ClassLoader clsLdr)` Unmarshals object from byte array using given class loader.
    `<T> T` | `unmarshal(InputStream in, @Nullable ClassLoader clsLdr)` Unmarshals object from the input stream using given class loader.
    `protected abstract <T> T` | `unmarshal0(byte[] arr, @Nullable ClassLoader clsLdr)` Unmarshals object from byte array using given class loader.
    `protected abstract <T> T` | `unmarshal0(InputStream in, @Nullable ClassLoader clsLdr)` Unmarshals object from the input stream using given class loader.

    - ### Methods inherited from class org.apache.ignite.marshaller.AbstractMarshaller

      `getContext, onUndeploy, setContext`

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

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

- - ### Constructor Detail

    - #### AbstractNodeNameAwareMarshaller

          public AbstractNodeNameAwareMarshaller()

  - ### Method Detail

    - #### nodeName

          public void nodeName(@Nullable
                               @Nullable String nodeName)

      Set node name.
      Parameters:
        `nodeName` - Node name.

    - #### marshal

          public byte[] marshal(@Nullable
                                @Nullable Object obj)
                         throws IgniteCheckedException

      Marshals object to byte array.
      Parameters:
        `obj` - Object to marshal. `null` object will be marshaled to binary `null` representation.
      Returns:
        Byte array.
      Throws:
        `IgniteCheckedException` - If marshalling failed.

    - #### marshal

          public void marshal(@Nullable
                              @Nullable Object obj,
                              OutputStream out)
                       throws IgniteCheckedException

      Marshals object to the output stream. This method should not close given output stream.
      Parameters:
        `obj` - Object to marshal. `null` object will be marshaled to binary `null` representation.
        `out` - Output stream to marshal into.
      Throws:
        `IgniteCheckedException` - If marshalling failed.

    - #### unmarshal

          public <T> T unmarshal(byte[] arr,
                                 @Nullable
                                 @Nullable ClassLoader clsLdr)
                          throws IgniteCheckedException

      Unmarshals object from byte array using given class loader.
      Type Parameters:
        `T` - Type of unmarshalled object.
      Parameters:
        `arr` - Byte array.
        `clsLdr` - If not `null` then given class loader will be used for unmarshal object.
      Returns:
        Unmarshalled object.
      Throws:
        `IgniteCheckedException` - If unmarshalling failed.

    - #### unmarshal

          public <T> T unmarshal(InputStream in,
                                 @Nullable
                                 @Nullable ClassLoader clsLdr)
                          throws IgniteCheckedException

      Unmarshals object from the input stream using given class loader. This method should not close given input stream.
      Type Parameters:
        `T` - Type of unmarshalled object.
      Parameters:
        `in` - Input stream.
        `clsLdr` - If not `null` then given class loader will be used for unmarshal object.
      Returns:
        Unmarshalled object.
      Throws:
        `IgniteCheckedException` - If unmarshalling failed.

    - #### marshal0

          protected abstract void marshal0(@Nullable
                                           @Nullable Object obj,
                                           OutputStream out)
                                    throws IgniteCheckedException

      Marshals object to the output stream. This method should not close given output stream.
      Parameters:
        `obj` - Object to marshal. `null` object will be marshaled to binary `null` representation.
        `out` - Output stream to marshal into.
      Throws:
        `IgniteCheckedException` - If marshalling failed.

    - #### marshal0

          protected abstract byte[] marshal0(@Nullable
                                             @Nullable Object obj)
                                      throws IgniteCheckedException

      Marshals object to byte array.
      Parameters:
        `obj` - Object to marshal. `null` object will be marshaled to binary `null` representation.
      Returns:
        Byte array.
      Throws:
        `IgniteCheckedException` - If marshalling failed.

    - #### unmarshal0

          protected abstract <T> T unmarshal0(InputStream in,
                                              @Nullable
                                              @Nullable ClassLoader clsLdr)
                                       throws IgniteCheckedException

      Unmarshals object from the input stream using given class loader. This method should not close given input stream.
      Type Parameters:
        `T` - Type of unmarshalled object.
      Parameters:
        `in` - Input stream.
        `clsLdr` - If not `null` then given class loader will be used for unmarshal object.
      Returns:
        Unmarshalled object.
      Throws:
        `IgniteCheckedException` - If unmarshalling failed.

    - #### unmarshal0

          protected abstract <T> T unmarshal0(byte[] arr,
                                              @Nullable
                                              @Nullable ClassLoader clsLdr)
                                       throws IgniteCheckedException

      Unmarshals object from byte array using given class loader.
      Type Parameters:
        `T` - Type of unmarshalled object.
      Parameters:
        `arr` - Byte array.
        `clsLdr` - If not `null` then given class loader will be used for unmarshal object.
      Returns:
        Unmarshalled object.
      Throws:
        `IgniteCheckedException` - If unmarshalling failed.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021