org.apache.ignite.marshaller

## Class AbstractMarshaller

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

- All Implemented Interfaces:
    Marshaller
  Direct Known Subclasses:
    AbstractNodeNameAwareMarshaller

      public abstract class AbstractMarshaller
      extends Object
      implements Marshaller

  Base class for marshallers. Provides default implementations of methods that work with byte array or `GridByteArrayList`. These implementations use `GridByteArrayInputStream` or `GridByteArrayOutputStream` to marshal and unmarshal objects.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected MarshallerContext` | `ctx` Context.
    `static int` | `DFLT_BUFFER_SIZE` Default initial buffer size for the `GridByteArrayOutputStream`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractMarshaller()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MarshallerContext` | `getContext()`
    `abstract void` | `onUndeploy(ClassLoader ldr)` Undeployment callback invoked when class loader is being undeployed.
    `void` | `setContext(MarshallerContext ctx)` Sets marshaller context.

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

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

    - ### Methods inherited from interface org.apache.ignite.marshaller.Marshaller

      `marshal, marshal, unmarshal, unmarshal`

- - ### Field Detail

    - #### DFLT_BUFFER_SIZE

          public static final int DFLT_BUFFER_SIZE

      Default initial buffer size for the `GridByteArrayOutputStream`.
      See Also:
        Constant Field Values

    - #### ctx

          protected MarshallerContext ctx

      Context.

  - ### Constructor Detail

    - #### AbstractMarshaller

          public AbstractMarshaller()

  - ### Method Detail

    - #### onUndeploy

          public abstract void onUndeploy(ClassLoader ldr)

      Undeployment callback invoked when class loader is being undeployed. Some marshallers may want to clean their internal state that uses the undeployed class loader somehow.
      Parameters:
        `ldr` - Class loader being undeployed.

    - #### getContext

          public MarshallerContext getContext()

      Returns:
        Marshaller context.

    - #### setContext

          public void setContext(MarshallerContext ctx)

      Sets marshaller context.
      Specified by:
        `setContext` in interface `Marshaller`
      Parameters:
        `ctx` - Marshaller context.

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