Serialization (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.serializer, interface: Serialization

Package org.apache.hadoop.io.serializer

# Interface Serialization<T>

Type Parameters:
  `T` - generic type.

All Known Implementing Classes:
  `AvroReflectSerialization`, `AvroSerialization`, `AvroSpecificSerialization`, `JavaSerialization`, `WritableSerialization`

@LimitedPrivate({"HDFS","MapReduce"}) @Evolving public interface Serialization<T>

Encapsulates a `Serializer`/`Deserializer` pair.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `accept(Class<?> c)`
  Allows clients to test whether this `Serialization` supports the given class.
  `Deserializer<T>`
  `getDeserializer(Class<T> c)`
  `Serializer<T>`
  `getSerializer(Class<T> c)`

- ## Method Details

  - ### accept

    boolean accept(Class<?> c)
    Allows clients to test whether this `Serialization` supports the given class.
    Parameters:
      `c` - class.
    Returns:
      if accept true,not false.

  - ### getSerializer

    Serializer<T> getSerializer(Class<T> c)
    Parameters:
      `c` - class.
    Returns:
      a `Serializer` for the given class.

  - ### getDeserializer

    Deserializer<T> getDeserializer(Class<T> c)
    Parameters:
      `c` - class.
    Returns:
      a `Deserializer` for the given class.